Skip to content

Instantly share code, notes, and snippets.

@coulterpeterson
Created November 3, 2023 14:57
Show Gist options
  • Save coulterpeterson/f9a6b3906bd05e22d84ad9a5e1964ce4 to your computer and use it in GitHub Desktop.
Save coulterpeterson/f9a6b3906bd05e22d84ad9a5e1964ce4 to your computer and use it in GitHub Desktop.
Ubuntu Runaway Web Server Fire Fighting Toolbelt (Restarting Various Processes)
# Start with the obvious
sudo shutdown -r now
# Check CPU/memory usage
top
# Get running services
systemctl --type=service --state=running
# Start restarting them
sudo systemctl restart mariadb
sudo systemctl restart php-fpm.service
sudo systemctl restart nginx.service
# Check CPU/memory usage again, rinse and repeat
top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment