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.