Skip to content

Instantly share code, notes, and snippets.

@chaeplin
Created March 27, 2017 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaeplin/92dcb445f53f2eae21c9620b870100e4 to your computer and use it in GitHub Desktop.
Save chaeplin/92dcb445f53f2eae21c9620b870100e4 to your computer and use it in GitHub Desktop.
# /etc/init/nginx.conf - add this below the "respawn" line (line 7)
limit nofile 50000 50000
# /etc/sysctl.conf - add this to the bottom of the file
fs.file-max = 50000
net.core.somaxconn = 65536
net.ipv4.tcp_max_tw_buckets = 1440000
# /etc/security/limits.conf - add this to the bottom of the file
www-data soft nofile 50000
www-data hard nofile 50000
www-data soft nproc 50000
www-data hard nproc 50000
# /etc/nginx/nginx.conf - edit the open_file_cache directive
open_file_cache max=50000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment