Skip to content

Increase the maximum number of open files / file descriptors

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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  1. How to determine the type of a file in Linux
  2. Find files by owner
  3. Change the maximum allowed binary log file size in MySQL
  4. How to split a large file into multiple smaller files in Linux
  5. How to check failed login attempt in Ubuntu

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*