我有一个在heroku 上托管的Rails 3.1.4 应用程序。我已经添加了logentries add-on http://devcenter.heroku.com/articles/logentries。
我没有触及警报的默认配置,现在我每隔几个小时就会收到一条警报:“退出超时”:
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
日志和此电子邮件警报都没有给我任何有用的信息来开始寻找这个问题。
我的流量非常低(应用程序仍处于私人测试版)。我怀疑是 heroku 关闭了应用程序,并且我的应用程序没有按预期响应 SIGTERM 信号。
我在应用程序中没有任何奇特的东西(例如使用 Heroku Scheduler 启动的 rake 任务)。
唯一有点不同寻常的是宝石的使用apn_on_rails
,这会打开与 Apple 的 APN 服务器的连接。
您知道是什么原因造成的吗?我应该忽略这一点并关闭警报吗?
如果您使用 webrick 在 Heroku 上运行应用程序,则应该切换到使用“thin”:请参阅https://devcenter.heroku.com/articles/rails3#webserver https://devcenter.heroku.com/articles/rails3#webserver
这从我的日志中删除了所有出现的 R12 错误。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)