greetings,
i have been trying to get merb and monit to play well. but monit
won''t restart merb. neither will monit stop merb if it is still
running but not responding.
below is the monit config for the merb app.
anyone know what i am doing wrong or have good strategies for using
monit and merb?
thank you - john weir
check process manwith-4000 with pidfile /path_to_merb_app/log/merb.
4000.pid
start program = " /usr/bin/merb -u nobody -G nogroup -e
production -d -m /path_to_merb_app/ -f
/path_to_merb_app/dist/conf/upload.conf -M /path_to_merb_app/dist/
conf/merb.yml"
stop program = "/usr/bin/merb -k 4000"
if totalmem is greater than 95.0 MB for 2 cycles then
restart # eating up memory?
#if cpu is greater than 50% for 2 cycles then
alert # send an email to admin
if cpu is greater than 80% for 3 cycles then
restart # hung process?
#if loadavg(5min) greater than 10 for 8 cycles then
restart # bad, bad, bad
if 3 restarts within 5 cycles then
timeout # something is wrong, call
the sys-admin
if failed port 4000 protocol http # check for
response
with timeout 10 seconds
then start
group mongrel