Will monit restart delayed_job [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
开发者_如何学JAVAClosed 10 years ago.
Improve this questionIf my delayed_job
server broke then will monit
automatically restart the delayed_job
server?
You have to tell monit to do this... I use the following config:
check process delayed_job with pidfile /srv/rails/restorm_com/current/tmp/pids/delayed_job.pid
start program = "/bin/su -c 'RAILS_ENV=production /srv/rails/restorm_com/current/script/delayed_job start' rails"
stop program = "/bin/su -c 'RAILS_ENV=production /srv/rails/restorm_com/current/script/delayed_job stop' rails"
if cpu > 80% for 3 cycles then alert
if loadavg(5min) greater than 2 for 3 cycles then alert
精彩评论