Le 12/04/2012 15:27, David Montgomery a écrit :
When I run apache ab in a t1.micro the site crashes. This is what I
want. Its a spawn-fcgi script under control of runit. I am using
nginx and the unix socket is in /tmp/9002.socket.
But I also want to use monit to bring it back up. When I go
http://mysite.com/pixel in FF the page will not load. Even further
the pid still looks alive according to monit. I get a green light.
When testing local host I still get a green light. According to monit
the site is still good and the pid is still good so wit will not
restart. I get no emails alerts and monit loves to send emails:)
I can now restart the service from monit. But, monit will not
automatically restart the service. I have tried the following.
check host localhost with address 127.0.0.1
start program = "/bin/bash -c '/usr/bin/killall pixelServer&&
sleep 2&& /home/ubuntu/test.sh'"
stop program = "/usr/bin/sv kill pixelServer"
if failed url
http://127.0.0.1:80/pixel
and timeout 2 seconds
then exec "/bin/bash -c '/home/ubuntu/test.sh'"
Hi,
Be carefull
/usr/bin/killall pixelServer&& sleep 2&& /home/ubuntu/test.sh
Will work only if there is some processes to kill, try
(/usr/bin/killall pixelServer&& sleep 2 ) ; /home/ubuntu/test.sh
this way the script will be launched if there was process(es) OR NOT.
If there is process(es) to kill , a 2 second sleep wait will be done only if
some processes was existing,
to let them time to close properly.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general