当Heroku工作人员运行delayed_job并且无法解决原因时,我收到以下错误。第一个错误似乎与Evernote gem有关,即使我实际上根本没有在整个项目中使用它的任何代码。我只有
gem 'evernote', "~> 0.9.0"
在gemfile中。
第二个似乎与Newrelic Heroku插件有关,它是一个应用程序监控服务。但它确实监视应用程序,所以我不知道是什么原因导致错误。
造成这些错误的原因是什么?
第一
2011-05-11T03:31:22+00:00 heroku[worker.3]: Stopping process with SIGTERM
2011-05-11T03:31:22+00:00 app[worker.3]: rake aborted!
2011-05-11T03:31:22+00:00 app[worker.3]: SIGTERM
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `block in require'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `block in load_dependency'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:591:in `new_constants_in'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `load_dependency'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-05-11T03:31:22+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/evernote-0.9.0/vendor/gen-rb/evernote.rb:5:in `<top (required)>'
2011-05-11T03:31:22+00:00 heroku[worker.3]: Process exited
2011-05-10T20:31:23-07:00 heroku[worker.2]: State changed from up to stopping
第二
2011-05-11T03:31:25+00:00 heroku[worker.2]: Stopping process with SIGTERM
2011-05-11T03:31:25+00:00 app[worker.2]: rake aborted!
2011-05-11T03:31:25+00:00 app[worker.2]: SIGTERM
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching/pages.rb:38:in `extend'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching/pages.rb:38:in `<module:Pages>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching/pages.rb:37:in `<module:Caching>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching/pages.rb:6:in `<module:ActionController>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching/pages.rb:5:in `<top (required)>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching.rb:60:in `<module:Caching>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching.rb:31:in `<module:ActionController>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/caching.rb:5:in `<top (required)>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/base.rb:192:in `<class:Base>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/base.rb:167:in `<module:ActionController>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/actionpack-3.0.1/lib/action_controller/base.rb:3:in `<top (required)>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/vendor/plugins/rpm/lib/new_relic/control/frameworks/rails.rb:127:in `install_shim'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/vendor/plugins/rpm/lib/new_relic/control.rb:137:in `init_plugin'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/vendor/plugins/rpm/init.rb:26:in `block in <class:Plugin>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/plugin.rb:81:in `eval'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/plugin.rb:81:in `block in <class:Plugin>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `instance_exec'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:25:in `run'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:50:in `block in run_initializers'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `each'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/initializable.rb:49:in `run_initializers'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/application.rb:134:in `initialize!'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/config/environment.rb:5:in `<top (required)>'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `block in load_dependency'
2011-05-11T03:31:25+00:00 app[worker.2]: /app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
2011-05-11T03:31:25+00:00 app[worker.2]: /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
2011-05-11T03:31:25+00:00 app[worker.2]: /usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
2011-05-11T03:31:25+00:00 heroku[worker.2]: Process exited
编辑:
这是堆栈信息:
Stack: bamboo-mri-1.9.2
编辑2:
这是另一个:
2011-05-19T02:07:07+00:00 app[worker.1]: "success - end"
2011-05-19T02:07:07+00:00 app[worker.1]: [Worker(host:9c66d1f3-82a1-4489-b20b-b8460a467223 pid:1)] Mixpanel completed after 1.7464
2011-05-19T02:07:07+00:00 app[worker.1]: [Worker(host:9c66d1f3-82a1-4489-b20b-b8460a467223 pid:1)] 2 jobs processed at 0.1720 j/s, 0 failed ...
2011-05-19T02:07:07+00:00 app[worker.3]: rake aborted!
2011-05-19T02:07:07+00:00 app[worker.3]: SIGTERM
2011-05-19T02:07:07+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/builder-2.1.2/lib/blankslate.rb:107:in `append_features'
2011-05-19T02:07:07+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/devise-1.1.5/lib/devise/orm/active_record.rb:35:in `include'
2011-05-19T02:07:07+00:00 app[worker.3]: /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.1/lib/rails/engine.rb:200:in `block in <class:Engine>'
2011-05-19T02:07:07+00:00 heroku[worker.3]: Process exited
2011-05-18T19:07:08-07:00 heroku[worker.2]: State changed from created to starting
2011-05-19T02:07:08+00:00 app[worker.2]: [Worker(host:df710df0-7b32-42b7-b477-b810485b5dc7 pid:1)] RPM Monitoring DJ worker host:df710df0-7b32-42b7-b477-b810485b5dc7 pid:1
2011-05-19T02:07:08+00:00 app[worker.2]: Starting the New Relic Agent.
2011-05-19T02:07:08+00:00 app[worker.2]: [Worker(host:df710df0-7b32-42b7-b477-b810485b5dc7 pid:1)] Starting job worker
2011-05-19T02:07:09+00:00 heroku[worker.2]: Stopping process with SIGTERM
2011-05-19T02:07:09+00:00 app[worker.2]: [Worker(host:df710df0-7b32-42b7-b477-b810485b5dc7 pid:1)] Exiting...
2011-05-19T02:07:11+00:00 heroku[worker.2]: Starting process with command: `rake jobs:work`
2011-05-19T02:07:14+00:00 heroku[worker.2]: Process exited
2011-05-19T02:07:20+00:00 app[worker.2]: [Worker(host:5d665233-0dc4-4151-aab2-a64b7656df07 pid:1)] RPM Monitoring DJ worker host:5d665233-0dc4-4151-aab2-a64b7656df07 pid:1
2011-05-19T02:07:20+00:00 app[worker.2]: Starting the New Relic Agent.
2011-05-19T02:07:20+00:00 app[worker.2]: [Worker(host:5d665233-0dc4-4151-aab2-a64b7656df07 pid:1)] Starting job worker
答案 0 :(得分:3)
我唯一一次收到消息“使用SIGTERM停止进程”是我手动终止进程的时候 - 例如当我运行脚本/服务器然后点击CTRL-C
这是一条操作系统消息,说该进程是故意终止的。这不是内部失败。
我建议您与heroku人聊聊您的流程是否正在做一些愚蠢的行为并且终止它。
答案 1 :(得分:2)
来自heroku帮助:
R12 - 退出超时
进程无法在发送SIGTERM后10秒内退出,表明它应该停止。该过程被发送给SIGKILL以强制退出。
请参阅: https://devcenter.heroku.com/articles/error-codes#r12__exit_timeout
似乎你需要更快的代码。