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

Answer:

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)

E.g.

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

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

Finally restart your system.

 Leave a Reply

(required)

(required)

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>