Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Jan 112010

Increase the maximum number of open files / file descriptors


If you are root, execute the command below

ulimit -SHn 65535

If you want to set it permanently, especially for a particular user, change the file /etc/security/limits.conf to have the following lines (assume user = www-data)


www-data hard nofile 65535
www-data soft nofile 65535

And make sure uncomment from the different files under /etc/pam.d, e.g. sudo, login, sshd, ...

Finally restart your system.

  2 Responses to “Increase the maximum number of open files / file descriptors”

  1. [...] Source: [...]

  2. [...] Source: [...]

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>