Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

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.

Tags:

Monit

Centos7

Apache 2.4

Related

How to set Amazon Route53 for multiple distinct domains on the same IP address? My public IP address keeps changing. How can I connect to AWS EC2? "Bad message" with a new SAN using multipath and iSCSI What is a correct IP4 CIDR for AWS? Dell iDRAC6 virtual console viewer from GNU/Linux command line AWS Client VPN SSO SAML Linux client How to migrate physical server to VMware VM Replicating storage efficiently Export VM ESX Thin Provisionned How to Handle Sudden Burst in New HTTPS Connections? Why do cloud compute instances spin up VMs and not containers? How to decrease humidity level in a server room

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy