Rails app hosted on heroku: Error R12 (Exit timeout)

本小妞迷上赌 提交于 2019-12-20 09:37:32

问题


I have a Rails 3.1.4 app hosted on heroku. I have added the logentries add-on. I didn't touch the default configuration for alerts, and I now receive every few hours an alert: 'Exit timeout':

Exit timeout: Heroku/myappname

2012-03-23 11:01:41.723
168 <40>1 2012-03-23T11:01:41+00:00 d. heroku web.1 - - Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM

You are receiving this email because your Logentries alarm "Exit timeout"
has been triggered.

In context:
2012-03-23 11:01:28.878 95 <40>1 2012-03-23T11:01:28+00:00 d. heroku web.1 - - Idling
2012-03-23 11:01:31.740 118 <40>1 2012-03-23T11:01:31+00:00 d. heroku web.1 - - Stopping process with SIGTERM
2012-03-23 11:01:41.723 168 <40>1 2012-03-23T11:01:41+00:00 d. heroku web.1 - - Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM

The logs nor this email alert do not give me anything useful to start looking for this issue.

I have a very low traffic (application still in private beta). I suspect it's heroku shutting down the application, and my application does not respond as expected to the SIGTERM signal.

I do not have anything fancy in the application (such as a rake task launched with Heroku Scheduler).
The only thing slightly out of the ordinary is the use of the gem apn_on_rails, which open a connection to Apple's APN servers.

Do you have any idea what is causing this? Should I just ignore this and turn the alert off?


回答1:


If you're using webrick to run your application on Heroku, you should switch to using 'thin': See https://devcenter.heroku.com/articles/rails3#webserver

This removed all occurrences of the R12 error from my logs.



来源:https://stackoverflow.com/questions/9838824/rails-app-hosted-on-heroku-error-r12-exit-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!