Bug Hunting Session
Bug 124478 - Print number of file descriptors we have ...
Summary: Print number of file descriptors we have ...
Status: NEW
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Reported: 2019-04-01 16:12 UTC by Michael Meeks
Modified: 2019-04-02 03:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2019-04-01 16:12:27 UTC
For very large Online instances we can be limited by the number of available file-descriptors.

We can fetch that with:


getrlimit - with RLIMIT_NOFILE

For each client that connects - we accept a new file-descriptor, and for each document we have another Kit process that we need to talk to down a file descriptor - we also have a wakeup pipe that is 2 file descriptors per socket poll.

So - we should divide this number by 4 to get a maximum number of documents that we can open - and then take off a few - eg. 8 (ie. 32 fds) for the basic console/output/and other polls we have around for things.

then we should print that number out in the logs at early startup - along with the maximum-FD - since we print a lot of #<fd> numbers in the logs.

Thanks !