-
-
Save hellolucky/3662839 to your computer and use it in GitHub Desktop.
Configure max open file
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
| ## Configure max open file | |
| ref : [nodejs.production](https://github.com/dreamerslab/nodejs.production), only `nodejs` user can open more files | |
| $ sudo su | |
| $ echo "nodejs soft nofile 51200" >> /etc/security/limits.conf | |
| $ echo "nodejs hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "www-data hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "www-data hard nofile 51200" >> /etc/security/limits.conf | |
| $ echo "session required pam_limits.so" >> /etc/pam.d/common-session | |
| $ exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment