monit-general
[Top][All Lists]
Advanced

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

Re: Monit Can't Stop Apache


From: Chris Lopeman
Subject: Re: Monit Can't Stop Apache
Date: Tue, 01 Mar 2005 16:35:00 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

Jan-Henrik Haukeland wrote:

On Mar 1, 2005, at 3:54, Chris Lopeman wrote:

Based on what you said above, I really think you are missing the point.  The kill -9 is not something I would normally do.  It was not meant to be a clean way of exiting apache.  It is a simulation of something going wrong.  Just the type of thing that Monit is there to handle.

Testing apache and monit the way you do is absolutely okay and fine. You found a relevant problem and we only suggested ways to deal with the problem. Once you implement a solution (e.g. by adding code to kill any stray apache children in the startup script) monit should work just fine for you.

Well I am just gonna call restart in the init script instead of start.  That will take care of the above but I thought the issue through a little more and that's below.  I pasted in this reply to tried to cut down on the thread splitting up. 

Hey don't take any of what I have said in a bad way.  Even if I say your wrong.  Your still doing great work and I appreciate it.

Jan-Henrik Haukeland wrote:
......snip.....
Anyway I think I was too subtle.  My real questions more general.  Should people setting up monit seriously consider using restart on each process instead of  start? 

No

Or should monit trust the stop scripts more and just run them? 

No

Actually I believe this answer is wrong.  While many things in software design are a matter of opinion, a few are not.  This, I now believe is black and white; and the answer is "Monit" should run the stop script unconditionally. 

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.  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.  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.

Thanks for Listening,

Chris Lopeman

--
Jan-Henrik Haukeland
mobile +47 97141255



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



reply via email to

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