How To Increase Maximum Number Of Open Files

May 2, 2011 | By
| Reply More

Command to list the number of open file descriptors

Use the following command to display the 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 applications such as Oracle database server needs this range to be quite higher. So, you can increase the maximum number of open files by setting a new value in kernel variable /proc/sys/fs/file-max as follows:

(login as the root)

# sysctl -w fs.file-max=100000

The command above forces the limit to 100000 files. You need to edit /etc/sysctl.conf the file and put the following line so that after rebooting 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 allow the changes to take effect or just type command:

# sysctl -p

Verify your settings with the following command:

# cat /proc/sys/fs/file-max


# sysctl fs.file-max

Filed Under : HOWTOS

Free Linux Ebook to Download

Leave a Reply

All comments are subject to moderation.