ruby-on-rails-3 – Monit Ruby on Rails Sidekiq

前端之家收集整理的这篇文章主要介绍了ruby-on-rails-3 – Monit Ruby on Rails Sidekiq前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试为Sidekiq设置Monit.这是我到目前为止配置文件内容
check process sidekiq_site
  with pidfile /var/www/site/tmp/pids/sidekiq.pid
  start program = "bundle exec sidekiq -C /var/www/site/config/sidekiq.yml -P /var/www/site/tmp/pids/sidekiq.pid" with timeout 90 seconds
  if totalmem is greater than 200 MB for 2 cycles then restart # eating up memory?
  group site_sidekiq

问题是,当我运行monit reload时,我收到的消息是程序“bundle”不存在.

有人有解决方案吗?

解决方法

检查一下: https://groups.google.com/forum/?fromgroups=#!topic/rubyversionmanager/0abB9jlqi_Y
如果你使用rvm,
/bin/su - <username> -c 'bundle exec sidekiq -C /var/www/site/config/sidekiq.yml -P /var/www/site/tmp/pids/sidekiq.pid'

如果从用户启动monit,请在.bash_profile中设置$HOME.

或调查答案:https://github.com/mperham/sidekiq/issues/506

原文链接:https://www.f2er.com/ruby/265580.html

猜你在找的Ruby相关文章