开发者

Will monit restart delayed_job [closed]

开发者 https://www.devze.com 2023-01-04 14:23 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

开发者_如何学JAVA

Closed 10 years ago.

Improve this question

If 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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号