【问题标题】:Managing Resque workers with Monit on RBenv setup在 RBenv 设置上使用 Monit 管理 Resque 工作人员
【发布时间】:2012-08-19 03:03:14
【问题描述】:
我正在尝试设置 Monit 来管理 Resque 工作人员,但它无法开始说 /home/deployer/.rbenv/shims/bundle: line 4: exec: rbenv: not found
我已经检查过它是否以deployer 用户身份运行命令,如果我直接通过 SSH 复制并粘贴命令,一切正常。下面是我的监视器配置。谢谢!
检查进程 resque_worker_1
使用 pidfile CURRENT_PATH/tmp/pids/resque_worker_1.pid
启动程序 = "/usr/bin/env HOME=/home/deployer RACK_ENV=production PATH=/home/deployer/.rbenv/shims:/usr/local/bin:/usr/local/ruby/bin:/usr/ bin:/bin:$PATH /bin/sh -l -c 'cd CURRENT_PATH; bundle exec rake environment resque:work RAILS_ENV=production QUEUE=high,normal,low VERBOSE=1 PIDFILE=CURRENT_PATH/tmp/pids/resque_worker_1.pid >> CURRENT_PATH/log/resque_worker_.log 2>&1'"
作为 uid 部署者和 gid 管理员
stop program = "/bin/sh -c 'cd CURRENT_PATH && kill -9 $(cat tmp/pids/resque_worker_1.pid) && rm -f tmp/pids/resque_worker_1.pid; exit 0;'"
作为 uid 部署者和 gid 管理员
如果 totalmem 在 10 个周期内大于 300 MB 然后重新启动 # 吃掉内存?
组 resque_workers
【问题讨论】:
标签:
ruby-on-rails
resque
monit
rbenv