Skip to content

Instantly share code, notes, and snippets.

@JamesTheHacker
Created December 10, 2019 18:59
Show Gist options
  • Save JamesTheHacker/d3f0e91449b09c2269b77aad0ddd20bd to your computer and use it in GitHub Desktop.
Save JamesTheHacker/d3f0e91449b09c2269b77aad0ddd20bd to your computer and use it in GitHub Desktop.
PHP config
# TODO: Use calculation to set these sizes
sed -r -i 's/^;?pm ?=.*$/pm = dynamic/' /etc/php/7.2/fpm/pool.d/www.conf
sed -r -i 's/^;?pm.max_children ?=.*$/pm.max_children = 25/' /etc/php/7.2/fpm/pool.d/www.conf
sed -r -i 's/^;?pm.start_servers ?=.*$/pm.start_servers = 10/' /etc/php/7.2/fpm/pool.d/www.conf
sed -r -i 's/^;?pm.min_spare_servers ?=.*$/pm.min_spare_servers = 5/' /etc/php/7.2/fpm/pool.d/www.conf
sed -r -i 's/^;?pm.max_spare_servers ?=.*$/pm.max_spare_servers = 20/' /etc/php/7.2/fpm/pool.d/www.conf
sed -r -i 's/^;?pm.max_requests ?=.*$/pm.max_requests = 500/' /etc/php/7.2/fpm/pool.d/www.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment