Increasing limit of open files in linux

Sep 5th, 2013 | Filed under gentoo

Sooner or later when doing some bigger system or just by messing with os you will meet that error:

Too many open files

You can solve it quickly by:

vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 200000
Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max

 vi /etc/security/limits.conf
Set admin user (or for any other user) soft and hard limits as follows:
admin soft nofile 200000
admin hard nofile 200000

Done

Tags:
No comments yet.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image