当我启动worker时,一切运行良好。
我已经成功地在heroku雪松堆栈上运行resque并将接口安装在rails上。工作人员处理这项工作。但是当我杀死工人时,Resque仍然认为工人是可用的。当我开始另一名工人时,它认为有2名工人,但实际上只有一名工人。
我也注意到这里 devcenter.heroku/articles/ps 当杀死一名工人时,heroku发送SIGTERM,如果那不终止,那么它发送SIGKILL。
这是我的工作日志
2011-08 -11T02:32:45 + 00:00 heroku [worker.1]:用命令`bundle exec rake resque:work QUEUE = *` 2011-08-11T02:32:46 + 00:00启动进程heroku [worker.1]:状态从开始变为变化 2011-08-11T02:33:58 + 00:00 heroku [worker.1]:状态从最初变为停止 2011-08- 11T02:34:00 + 00:00 heroku [worker.1]:用SIGTERM 停止进程2011-08-11T02:34:09 + 00:00 heroku [worker.1]:错误R12(退出超时) - > SIGTERM 2011-08-11T02:34:09 + 00:00 heroku [worker.1]:使用SIGKILL停止进程 2011-08-11T02:34:11 +00:00 heroku [worker.1]:进程已退出我发现我的进程需要更多10s终止。这是否有什么要做,因为我在worker任务上加载rails环境?
这是我的rake任务 lib / tasks / resque.rake
requireresque / tasks taskresque:setup => :environment解决方案
我刚发现问题,当在rake任务上传递 ENV 时。例如当传递 QUEUE ='*'。
以下是更完整的问题 github/defunkt/resque/issues/319#issuecomment-1789239
这个问题仍然存在于 github/defunkt/resque/issues/368
任何我的临时补丁,这使得resque只运行所有que。 p>
github/yulrizka/resque
I have successfully run resque on heroku cedar stack and mount the interface on rails.
when I start the worker, Everything works fine. The worker process the job. But When i kill the worker, Resque still think that the worker is available. When I start another worker, it then think there are 2 worker but in fact there is only one running.
I also notice form here devcenter.heroku/articles/ps that heroku send SIGTERM when killing a worker and if that does not terminate then it send SIGKILL.
here is my worker logs
2011-08-11T02:32:45+00:00 heroku[worker.1]: Starting process with command `bundle exec rake resque:work QUEUE=*` 2011-08-11T02:32:46+00:00 heroku[worker.1]: State changed from starting to up 2011-08-11T02:33:58+00:00 heroku[worker.1]: State changed from up to stopping 2011-08-11T02:34:00+00:00 heroku[worker.1]: Stopping process with SIGTERM 2011-08-11T02:34:09+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM 2011-08-11T02:34:09+00:00 heroku[worker.1]: Stopping process with SIGKILL 2011-08-11T02:34:11+00:00 heroku[worker.1]: Process exitedI see that my process takes more then 10s to terminate. Is this have anything to do because I load up rails environment on the worker task ?
this is my rake task lib/tasks/resque.rake
require "resque/tasks" task "resque:setup" => :environment解决方案
I just found out the problem, this happend when passing ENV on the rake task. like when passing QUEUE='*'.
Here is the issue more complete github/defunkt/resque/issues/319#issuecomment-1789239
and the issue are still in discus at github/defunkt/resque/issues/368
any my temporary patch, that make resque only run all que.
github/yulrizka/resque
更多推荐
Heroku雪松堆栈上的Resque工人终止后,工人计数仍然存在
发布评论