After installation we recommend that you manually set the following system limits to the Linux server. Otherwise the application may exceed max open file limits and you will see an error “Too many open files”.
System-wide limit
Per-user descriptors limit
Xinetd service limit
To set system-wide limit
Use the following command to verify that the system-wide limit for ‘Max open files’ (descriptors) is set to unlimited (or greater than or equal to 10,000,000):
cat /proc/sys/fs/file-max
If the limit is not set to unlimited (or greater than or equal to 10,000,000), use the following steps to increase the total number of files that can remain open system-wide:
Open the file /etc/sysctl.conf.
Add
fs.file-max=10000000
.Run
sysctl -p
.
To set per-user descriptors limit
Run the following command to verify that the per-user descriptors limit is at least 1,000,000:
limit
orulimit -a
(if limit is not available)If the limit is not set to at least 1,000,000, increase the soft and hard values for this limit.
Open the file /etc/security/limits.conf.
Add desired values for all or a specific user.
user hard nofile 1000000
user soft nofile 1000000
To set xinetd service limit
-
Use the following steps to verify that ‘Max open files’ limit for the xinetd service is set to 1,000,000:
-
Run
ps -ef | grep xinetd
to get the PIDs. -
Run
cat /proc/PID/limits
.If the limit is not set to 1,000,000, use the following steps to increase it:
-
Stop xinetd service by running
systemctl stop xinetd
. -
Open /usr/lib/systemd/system/xinetd.service.
-
Add
LimitNOFILE=1000000
at the end of the [Service] paragraph. -
Start the service by running
systemctl start xinetd
.
-