How to increase maximum number of open files
Command to list number of open file descriptors.
Use the following command command to display maximum number of open file descriptors:
#cat /proc/sys/fs/file-max
The number of maximum files was reached, how do I fix this problem?
Many application such as Oracle database server needs this range quite higher. So you can increase the maximum number of open files by setting new value in kernel variable /proc/sys/fs/file-max as follows (login as the root
# sysctl -w fs.file-max=100000
Above command forces the limit to 100000 files. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:
# vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 100000
Save and close the file. Users need to log out and log back in again to changes take effect or just type command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max
OR
# sysctl fs.file-max
Category: Linux Administration
