Created
November 5, 2015 15:24
-
-
Save dotcomputercraft/0947eb7ed6b3b5cc14b6 to your computer and use it in GitHub Desktop.
increase max number of ulimit open file and max user processes in Linux.
This file contains 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
1- Step : open the sysctl.conf and add this line fs.file-max = 65536 | |
vi /etc/sysctl.conf add end of line | |
fs.file-max=500000 | |
save and exit. | |
2. Step : vi /etc/security/limits.conf and add below the mentioned | |
* soft nproc 500000 | |
* hard nproc 500000 | |
* hard nofile 500000 | |
* soft nofile 500000 | |
root hard nofile 500000 | |
root soft nofile 500000 | |
jetadmin hard nofile 500000 | |
jetadmin soft nofile 500000 | |
nginx hard nofile 500000 | |
nginx soft nofile 500000 | |
and vi /etc/security/limits.d/90-nproc.conf | |
* soft nproc 500000 | |
* hard nproc 500000 | |
* soft nofile 500000 | |
* hard nofile 500000 | |
save and exit | |
3. Step - pam-limits | |
vi /etc/pam.d/common-session | |
Add following line at the end of the file: | |
session required pam_limits.so | |
save and exit | |
4. Reboot ubuntu server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice reference can do this by appending to the end of the file too in scripted manner :)