[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restarting based on load average dangerous?

From: Micah Anderson
Subject: Restarting based on load average dangerous?
Date: Fri, 12 May 2006 12:10:50 -0400
User-agent: Thunderbird (X11/20060501)

If the load on your system goes above a threshold and you know that
this is a result of a runaway process that needs to be restarted, will
this cause the process to be restarted over and over because the 1
minute load average will not drop fast enough to get below the threshold:

check system localhost
  if loadavg (1min) > 25 then exec "/usr/bin/monit apachectl restart"

I'm afraid that the load will climb to 35, monit will see this and
apache will be restarted, next cycle monit will see that the load
average is 30 (because it is going down), and it will issue a restart
*again*, the load will continue to drop, monit will see its now 26 and
restart apache a third time, when really there is no load problem as
the load delta is dropping.

Is there a way to make a load dependency that says, "If load gets
above 25, stop this process, once the load drops back down below 10
things are probably back to normal, so start the process again."?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]