Linux : Increase maximum open file descriptors

By | January 31, 2012

On most heavy usage servers, you probably need to override the maximum open file descriptors in order to handle the load! Do not play with this setting blindly, make sure you know what you’re doing! In most case, you will be warned in log wit message like this : Too many open files

You may have a look at the current value using the following command :

To increase it right away without reboot the server simply type (replace the value according your needs) :

Okay, now you need to add it to sysctl in order to make your new setting permanent (the above command will actually not make the setting survive to reboot) :

And add :


The above was to set the maximum file descriptor system wide. Setting it for specific user is not much difficult.

Edit :

And add :

(Replace “user” with the designated username and the number according your needs.)