我正在尝试为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,
如果你使用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.