The server allows for an unlimited number of connections by default, but is restricted by the file descriptor limit on the operating system. If needed, increase the file descriptor limit on the operating system with the following procedure.
If the operating system relies on systemd
, refer to the Linux
operating system documentation for instructions on setting the file descriptor
limit.
Once the operating system limit is set, the number of file descriptors that the server
will use can be configured by either using a NUM_FILE_DESCRIPTORS
environment variable, or by creating a config/num-file-descriptors
file
with a single line such as, NUM_FILE_ DESCRIPTORS=12345
. If these are
not set, the default of 65535
is used. This is strictly optional if
wanting to ensure that the server shuts down safely prior to reaching the file
descriptor limit.
For RedHat 7 or later, modify the 20-nproc.conf
file to set both the
open files and max user processes limits:
/etc/security/limits.d/20-nproc.conf
Add or edit the following lines if they do not already exist:
* soft nproc 65536
* soft nofile 65536
* hard nproc 65536
* hard nofile 65536
root soft nproc unlimited