CentOS: ulimit hard/soft limits keep reset to default values
If you set limits with the ulimit
command, your changes will remain effective only until log out or reboot. It's the observed behavior.
To change limits permanently you have to edit /etc/security/limits.conf
.
Here is how to set the values for soft and hard number of open files for everyone (*
).
* soft nofile 100000
* hard nofile 262144
For the changes to take effect you need to log out and re-login.
More info in the man page