Created
May 8, 2014 14:25
-
-
Save shaneog/dbea7955d34df4df7aec to your computer and use it in GitHub Desktop.
Used on Amazon Linux to set up reasonable system limits
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
echo " | |
fs.file-max = 70000" >> /etc/sysctl.conf; | |
DATA="* soft nofile 64000\n* hard nofile 64000\n* soft nproc 32000\n* hard nproc 32000\n\n# End of file"; | |
DATA=`echo ${DATA} | tr '\n' "\\n"`; | |
sed -i "s/# End of file/${DATA}/" /etc/security/limits.conf; | |
echo "# Default limit for number of user's processes to prevent | |
# accidental fork bombs. | |
# See rhbz #432903 for reasoning. | |
* soft nproc 32000 | |
* hard nproc 32000 | |
root soft nproc unlimited" | tee /etc/security/limits.d/90-nproc.conf; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment