Skip to content

Instantly share code, notes, and snippets.

@kolunar
Created April 24, 2017 22:57
Show Gist options
  • Save kolunar/5ca43eeaa138c0486fe9b0beaacdff8c to your computer and use it in GitHub Desktop.
Save kolunar/5ca43eeaa138c0486fe9b0beaacdff8c to your computer and use it in GitHub Desktop.
Ubuntu open file limit for all users
When you see PHP Warning: something like
"failed to open stream: Too many open files in /var/www/...
You need to check open file limit as below:
$ ulimit -n
4096
Change the following lines in the file: /etc/security/limits.conf
* soft nofile 4096
* hard nofile 4096
Add the following line in the file: /etc/pam.d/common-session
session required pam_limits.so
http://askubuntu.com/questions/162229/how-do-i-increase-the-open-files-limit-for-a-non-root-user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment