Le 12/04/2012 09:06, David Montgomery a écrit :
Hi,  agreed about using restart as being more elegant. But I am having
and issues about restarting the runit service after I try and break it
under load using apache AB using a t1.micro.

if I use the below..the service will never restart.  the pixelServer
is a python web.py script executed using spawn-fcgi.  I am using nginx
and unix sockets (unixsocket /tmp/nginx9002.socket).

In monit...I still get a green light for the service as well


check process pixelServer
   with pidfile "/etc/sv/pixelServer/supervise/pid"
   start program = "/usr/bin/sv start pixelServer"
   stop program = "/usr/bin/sv kill pixelServer"
   if failed host 127.0.0.1 port 80 protocol http
   request /pixel
   then restart


Hi,
something like below may help.
This ensure that no process is still running before doing a start.
check process pixelServer
   with pidfile "/etc/sv/pixelServer/supervise/pid"
   start program = "/usr/bin/killall pixelServer && sleep 2 ; usr/bin/sv start pixelServer"
   stop program = "/usr/bin/sv kill pixelServer"
   if failed host 127.0.0.1 port 80 protocol http
   request /pixel
   then restart



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

Reply via email to