Skip to content

Instantly share code, notes, and snippets.

@LBeckX
Created August 31, 2021 01:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LBeckX/b4e91bb438836bfe2c940e18242839f1 to your computer and use it in GitHub Desktop.
Save LBeckX/b4e91bb438836bfe2c940e18242839f1 to your computer and use it in GitHub Desktop.
Update ubuntu for many requests
# /etc/security/limits.conf
# Apache / Nginx
www-data soft nofile 30000
www-data hard nofile 80000
# MySQL
mysql soft nofile 30000
mysql hard nofile 80000
# /etc/nginx/nginx.conf
worker_processes 4;
worker_rlimit_nofile 80000;
events {
worker_connections 4048;
}
# /etc/sysctl.conf
fs.file-max = 150000
# /etc/php/7.3/fpm/pool.d/www.conf
pm.max_children = 80
pm.start_servers = 32
pm.min_spare_servers = 16
pm.max_spare_servers = 32
pm.max_requests = 500
pm = static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment