For some applications like elasticsearch, the maximum number of file descriptors needs to quite high. The way of modifying the value varies from distro to distro. In Cent OS6, the following did not work.
1. Using
2. Using
After the above approaches, when you check the value using the following, the value will show up.
However, setting the values as root, does not change the values for other regular users. To set it specifically for any user, change the value in
<user> soft nofile <value>
1. Using
sysctl
as rootsysctl -w fs.file-max=100000
2. Using
ulimit
as rootAfter the above approaches, when you check the value using the following, the value will show up.
cat /proc/sys/fs/file-max
However, setting the values as root, does not change the values for other regular users. To set it specifically for any user, change the value in
/etc/security/limits.conf
file. Setting only the soft or hard limit will not be sufficient. Therefore, the following lines should be added.<user> soft nofile <value>
<user> hard nofile <value>
After the modifications, it is required to logout and log back into the system.
No comments:
Post a Comment