Last active
August 29, 2015 14:04
-
-
Save RaphaelAudet/d5ce777883b651997ffd to your computer and use it in GitHub Desktop.
set open file limit
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
#!/bin/bash | |
cp /etc/sysctl.conf /etc/sysctl.conf.20140808 | |
echo 'fs.file-max = 64000'>>/etc/sysctl.conf | |
echo 'root soft nofile 64000'>>/etc/security/limits.conf | |
echo 'root hard nofile 64000'>>/etc/security/limits.conf | |
# echo 'mongodb soft nofile 64000'>>/etc/security/limits.conf | |
# echo 'mongodb hard nofile 64000'>>/etc/security/limits.conf | |
sysctl -p | |
ulimit -n 64000 | |
echo 'session required pam_limits.so' >> /etc/pam.d/common-session |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment