Skip to content

Instantly share code, notes, and snippets.

@claudsonm
Last active April 22, 2020 00:35
Show Gist options
  • Save claudsonm/983e85bce0da1e5c2ebcba945661e0ea to your computer and use it in GitHub Desktop.
Save claudsonm/983e85bce0da1e5c2ebcba945661e0ea to your computer and use it in GitHub Desktop.
Forge Recipes Scripts
# Disable Services (run as root)
sudo systemctl stop beanstalkd
sudo systemctl disable beanstalkd
sudo systemctl stop memcached
sudo systemctl disable memcached
sudo systemctl stop redis-server
sudo systemctl disable redis-server
sudo systemctl stop postgresql
sudo systemctl disable postgresql
sudo systemctl stop mysql
sudo systemctl disable mysql
# Adjust PHP-FPM to handle more traffic (run as root)
sudo sed -i "s/pm.max_children = .*/pm.max_children = 10/" /etc/php/7.4/fpm/pool.d/www.conf
sudo sed -i "s/pm.start_servers = .*/pm.start_servers = 4/" /etc/php/7.4/fpm/pool.d/www.conf
sudo sed -i "s/pm.min_spare_servers = .*/pm.min_spare_servers = 2/" /etc/php/7.4/fpm/pool.d/www.conf
sudo sed -i "s/pm.max_spare_servers = .*/pm.max_spare_servers = 4/" /etc/php/7.4/fpm/pool.d/www.conf
sudo sed -i "s/;pm.max_requests = .*/pm.max_requests = 1000/" /etc/php/7.4/fpm/pool.d/www.conf
sudo service php7.4-fpm restart
# Queue Workers and CRON servers
sudo systemctl stop nginx
sudo systemctl disable nginx
sudo systemctl stop php7.4-fpm
sudo systemctl disable php7.4-fpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment