Created
April 24, 2017 22:57
-
-
Save kolunar/5ca43eeaa138c0486fe9b0beaacdff8c to your computer and use it in GitHub Desktop.
Ubuntu open file limit for all users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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