[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Monit Can't Stop Apache
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Monit Can't Stop Apache |
Date: |
Wed, 2 Mar 2005 00:46:18 +0100 |
On Mar 1, 2005, at 23:35, Chris Lopeman wrote:
In the Monit FAQs it is recommended that Monit take over the starting
of the monitored services to avoid race conditions. I agree and did
so. Part of this setup is to have monit take over stopping of said
services during shutdown. Makes perfect sense. But Linux already
does this, so how it works is already laid out. That standard must
be maintained. The processes and script are designed to work with it
that way. Linux does not conditionally call the stop scripts...it
does so unconditionally. Not calling a stop script could lead to bad
things happening, like loss of data or lockup during shutdown.
Therefore Monit should unconditionally call the stop scripts at
shutdown.
Absolutely! But it is your responsibility to setup monit to do so,
which also is very easy to do.
But we already know that explicitly telling Monit to stop a process is
conditional and I assume sending "stop all" would have the same issue.
If you by this referee to the problem you earlier described with
apache, then let me again stress that this is a configuration problem,
which is *not* particular to monit but is general to the Linux sys.init
system as well. However there is *nothing* that prevents you from
configuring monit to unconditionally kill apache. Monit is only a tool
which you as a system admin. must configure correctly to make it work
correctly :-)
Of course Monit could just be changed to unconditionally call stop on
shutdown, but then that would make it inconsistent with itself. In
order for Monit to be internally consistent and meet the standards set
by Linux, it must unconditionally call stop on shutdown and restarts.
Monit itself may not do this, but if you let monit take over daemon
startup at boot time you should absolutely also setup monit to also
gracefully shutdown all daemons it controls at system shutdown. How to
do this is explained in the faq (see Answer 7. A).
--
Jan-Henrik Haukeland
Mobil +47 97141255