Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XSI-1706/CP-51295: limit open TCP connections to 250 and increase soc…
…ket backlog The default limit of 800 external TCP connections still leads to EMFILE for authenticated users. Due to the use of Unix.select/Thread.wait_timed_read we cannot increase the file descriptor limit beyond 1024 currently. We can assume that each API call needs at least 4 file descriptors: * 1 for the TCP connection that received the API call * another for system calls, or talking to member hosts * SMAPIv1 will also require at least one connection back to XAPI, which will needs its own thread, and at least 1 file descriptor to perform certain operations An API call could of course need more file descriptors than these, the real solution is to move to poll(2)/epoll(2) which doesn't have the 1024 limit that select(2) does. However meanwhile this prevents problems that users have reported. The downside is that users may now get client-side TCP errors if they open too many connections, but that is better than causing errors on unrelated API calls. To compensate increase the socket backlog from the default 128. Due to the old kernel that Dom0 runs this will also require changing 'somaxconn' in /etc/sysctl.d/90-dom0.conf, but this is not controlled by XAPI. Signed-off-by: Edwin Török <[email protected]>
- Loading branch information