[Top][All Lists]

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

Re: 2 copies started at once

From: Jan-Henrik Haukeland
Subject: Re: 2 copies started at once
Date: Fri, 27 Jul 2007 13:57:16 +0200

Monit simply does an exec of the script to create one process and there is nothing I can think of in monit's code that should be able to create this problem. The only thing I can think of is if, monit has a very short poll cycle (e.g. 1-5 sec) and the script does not write a pid file before monit polls again. So unless you use a very short poll cycle[1] I think you need to investigate and debug the start script to find the cause of the problem.

[1] If you do use a short poll cycle, try "set daemon 60" instead.

On 26. jul. 2007, at 16.16, Nick Upson wrote:

here is the config file entry

   check process bs1 with pidfile "/var/run/"
   start program = "/opt/unb/bin/ 1 restart"
   stop program = "/opt/unb/bin/ 1 stop"

(I use restart in case it crashed, leaving the old pid file)

I can see how restart could cause a problem if I called it twice in
very quick sucession but I didn't.

On 26/07/07, Nick Upson <address@hidden> wrote:
This may be related to the issue I asked about yesterday (turns out to
be a bug in monit) or may not.

Sometimes, even rarely, I do "monit start bs1" where bs1 is one of my
processes and 2 are started at once (same start time shown from ps
command, pid very close even).

How can I avoid this?

The config file entry is a normal one, nothing unusual. The script
executed to start/stop was originally in /etc/init.d and worked fine

reply via email to

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