Restart apache with monit
How can I configure monit to restart the httpd service when my cpu hits 100% for say 10 cycles?
This causes all my websites and http services to fail.
Probably use
check process apache with pidfile /path/to/pid
start "/sbin/service/apache2 start"
stop "/sbin/service/apache2 stop"
if failed host 127.0.0.1 port 80
for 10 cycles
then restart
of course, there will be more information on M/Monit wiki.