monit-general
[Top][All Lists]
Advanced

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

Re: Potential monit race condition in restart


From: Nick Upson
Subject: Re: Potential monit race condition in restart
Date: Thu, 20 Jun 2013 16:01:36 +0100

I'd like the ability to define a restart action, distinct from start & stop. This would avoid the whole problem of stop & start happening too quickly


On 17 June 2013 18:06, Leif Gustafson <address@hidden> wrote:

The same symptoms occur with a lot of services on RHEL at least.  sshd is another one that loses its pid file when using monit via stop/start even though the service is running correctly.  Instead of stop/start you could potentially use an execute action on failure and run /etc/init.d/httpd restart.  It is a very frustrating problem…

 

From: monit-general-bounces+leif=address@hidden [mailto:monit-general-bounces+leif=address@hidden] On Behalf Of Stoflet, Darryl M
Sent: Monday, June 17, 2013 8:31 AM
To: 'address@hidden'
Subject: Potential monit race condition in restart

 

Hi,

 

On RHEL6 apache the stop command to /etc/init.d/httpd pauses (by default 10s) to ensure the httpd processes are killed before actually deleting the pid file. When invoking `monit restart httpd` I notice that monit calls the stop command immediately followed by the start command (which is cfg for /etc/init.d/httpd <cmd>). Apache is being restarted however monit thinks it has failed since the pid file is missing. I believe this is because of /etc/init.d/httod stop script, which is deleting the pid file of the httpd process after it has started but before the 10s pause has completed.

 

Is there any way to configure the monit restart command to pause before calling start so that the stop command has time to complete?

 

Regards,

Darryl Stoflet

 


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



--
Nick Upson, Telensa Ltd

reply via email to

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