问题描述
我有一个托管在heroku上的Rails 3.1.4应用程序。我已经添加了 。
我没有触及警报的默认配置,现在我每隔几个小时就会收到一个警报:'退出超时':
退出超时:Heroku / myappname
2012-03-23 11:01:41.723
168< 40> 1 2012-03-23T11:01:41 + 00: 00 d。 heroku web.1 - - 错误R12(退出超时) - > SIGTERM
在10秒内无法退出进程您正在收到此电子邮件,因为您的Logentries报警退出超时
已被触发。
在上下文中:
2012-03-23 11:01:28.878 95 40 1 2012-03-23T11:01:28 + 00:00 d。 heroku web.1 - - 怠速
2012-03-23 11:01:31.740 118 1 2012-03-23T11:01:31 + 00:00 d。 heroku web.1 - - 用SIGTERM
停止进程2012-03-23 11:01:41.723 168 1 2012-03-23T11:01:41 + 00:00 d。 heroku web.1 - - 错误R12(退出超时) - >进程在SIGTERM
的10秒内未能退出。日志和此电子邮件警报不会给我任何有用的信息开始寻找这个问题。
我的流量非常低(应用仍处于私人测试版)。我怀疑是Herku关闭了应用程序,我的应用程序没有按照预期对SIGTERM信号做出响应。
我没有什么特别的应用程序(例如a使用Heroku Scheduler启动的rake任务)。
唯一不同寻常的地方是使用gem apn_on_rails
,它打开了与Apple的连接APN服务器。
你知道这是什么原因吗?如果你使用webrick在Heroku上运行你的应用程序,你应该忽略这一点并关闭警报? 应切换到使用瘦:请参阅
这从我的日志中删除了所有发生的R12错误。
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?
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.
这篇关于托管在heroku上的Rails应用程序:错误R12(退出超时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!