How To Increase Maximum Number Of Open Files

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

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.