For very large Online instances we can be limited by the number of available file-descriptors. We can fetch that with: http://man7.org/linux/man-pages/man2/setrlimit.2.html 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 !
Hello, I would like to take this issue. for this issue, I thought in a way that: in Linux we use $cat /proc/sys/fs/file-nr for the no. of file descriptors we have, the method I found is: is to do something like looping over all possible descriptors (use getrlimit() to read RLIMIT_NOFILE to find the range) calling something like fcntl(fd, F_GETFD, 0) on each one and checking for EBADF responses to see which ones are not open. If these are not appropriate please guide me on this.
Gökhan Karabulut committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/online/commit/e2e638c468f35322fc123664fd749b199f531780 tdf#124478: Log maximum file descriptor related limits
Thanks for the patch, Gökhan! Can this bug report be closed?
Re-evaluating the EasyHack in 2022 This seems to be fixed by the above patch. The number of available file descriptors are now logged.