Open file limits can impact some high-resource applications.
To check the number of files currently open by all processes in the system, run:
# lsof | wc -l
To check the number of files opened by all processes of a particular user, run the following command. Replace "root" with the username of the user in question.
# lsof -u root | wc -l
To check the maximum file limit of the current user, run:
# ulimit -n
Or to print a summary of all limits, run:
# ulimit -a
Changing file limits
To adjust file limits, edit the limit.conf file:
# vim /etc/security/limits.conf
username soft nofile 65536
username hard nofile 100000
Save the file and check the new limit using below command.
# ulimit -n
Note:
soft limit, is the default max value you get when you login
hard limit, is the max value to which you can raise using the ulimit command