check process mongrel-5000 with pidfile /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid start program = "/bin/su -c '/bin/rm -f /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid && /usr/bin/ruby /usr/bin/mongrel_rails start -d -e production -p 5000 -a 127.0.0.1 -P /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid -c /usr/local/nextgen/current' nextgen" stop program = "/bin/su -c '/usr/bin/ruby /usr/bin/mongrel_rails stop -P /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid && ([ ! -f /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid ] || (kill -9 `/usr/local/nextgen/current/tmp/pids/mongrel.5000.pid` && /bin/rm -f /usr/local/nextgen/current/tmp/pids/mongrel.5000.pid))' nextgen" if totalmem is greater than 80.0 MB for 5 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 5000 protocol http # check for response with timeout 10 seconds then restart group mongrel