Resque 命令可以从终端运行,但不能通过 bluepill 运行
我正在尝试让 bluepill 来监控我的 resque 工作人员。
如果我以 root 用户身份从 Rails 根目录运行此命令,它会正常启动 resque 工作程序。
cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
但是当我尝试使用 bluepill 运行它时,它只是不断尝试启动它并且不会给我错误。
这是我的 bluepill 日志,显示它正在尝试......!
W, [2011-07-12T22:58:21.640467 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:58:21.754392 #19267] INFO -- : [domain.com:resque] Going from down => starting
I, [2011-07-12T22:59:21.334300 #19267] INFO -- : [domain.com:resque] Going from starting => down
W, [2011-07-12T22:59:22.339873 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:59:22.479740 #19267] INFO -- : [domain.com:resque] Going from down => starting
它一遍又一遍地这样做。
这是我的 .pill 文件进程,
app.process("resque") do |process|
process.start_command = "cd #{RAILS_ROOT}; RAILS_ENV=#{RAILS_ENV} QUEUE=* bundle exec rake resque:work"
process.daemonize = true
process.start_grace_time = 10.seconds
process.stop_grace_time = 10.seconds
process.restart_grace_time = 10.seconds
end
我尝试延长启动宽限时间,如果它没有在所需的时间内加载,但没有产生影响。
请问有人可以帮忙吗?
提前致谢 瑞克
I am trying to get bluepill to monitor my resque workers.
If i run this command from my rails root as root user it starts up resque worker ok.
cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
but when i try to run it using bluepill it just keeps trying to start it and doesnt give me an error.
Here is my bluepill log showing it trying....!
W, [2011-07-12T22:58:21.640467 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:58:21.754392 #19267] INFO -- : [domain.com:resque] Going from down => starting
I, [2011-07-12T22:59:21.334300 #19267] INFO -- : [domain.com:resque] Going from starting => down
W, [2011-07-12T22:59:22.339873 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:59:22.479740 #19267] INFO -- : [domain.com:resque] Going from down => starting
it keeps doing this over and over.
here is my .pill file process
app.process("resque") do |process|
process.start_command = "cd #{RAILS_ROOT}; RAILS_ENV=#{RAILS_ENV} QUEUE=* bundle exec rake resque:work"
process.daemonize = true
process.start_grace_time = 10.seconds
process.stop_grace_time = 10.seconds
process.restart_grace_time = 10.seconds
end
I have tried to extend the start grace time for if its not loading in the required time but not making a difference.
Please can anyone help with this ?
thanks in advance
Rick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不适合使用bundle exec(有点旧),但可以轻松编辑。
这是我的生产环境Bluepill AudioBox.fm配置,经过实战测试,乐意分享。
Not adapted to use bundle exec (a little old) but can be edited easily.
This is my production environment Bluepill AudioBox.fm config, battle tested, happy to share.
@kain 的回答解决了您的问题吗?我刚刚开始发生非常类似的事情,请参阅 bluepill 没有检测到进程实际上已成功启动,因此创建了新进程
Did @kain's answer solve your problem? I have something very similar just started happening, see bluepill not detecting that processes have, in fact, started successfully, and so creates new ones
你没有说你使用的是哪个版本的 bluepill,但我刚刚修复了一个错误,该错误正是以这种行为表现出来的。 已提交拉取请求。
You don't say what version of bluepill you were on, but I just fixed a bug which manifested itself in exactly that behavior. Pull request submitted.
我在 ssh 中使用 capistrano + resque... 得到了这种东西
-> sudo service redis start,
通过capistrano启动-> sudo service redis start,说命令有效但没有进程...
I'm getting this kind of thing with capistrano + resque...
in ssh -> sudo service redis start, starts
through capistrano -> sudo service redis start, says command worked but no process...