Here’s a simple script I made up that will auto restart your HTTPD service if it reaches a high load.
The script will actually stop your HTTPD server when your load is higher than the maximum load settings and will re-start when the load is back to zero.
If you are on a server that’s overloaded, this script can help you “temporarily” get by instead of your web server dying and you manually rebooting your web server.
There’s also an extra “mail” feature that will email you whenever the server is stopped or restarted. (Code after