Heroku启动超时(错误R10)

cam*_*ase 20 heroku

每次我启动我的应用程序时,如果没有:

2012-05-06T22:41:11+00:00 heroku[web.1]: Stopping process with SIGKILL
2012-05-06T22:41:11+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2012-05-06T22:41:11+00:00 heroku[web.1]: Process exited with status 137
2012-05-06T22:41:12+00:00 heroku[web.1]: State changed from starting to crashed
Run Code Online (Sandbox Code Playgroud)

这是我的Procfile:

web: bundle exec thin start -p $PORT
Run Code Online (Sandbox Code Playgroud)

任何回复都将得到彻底的赞赏.

dB.*_*dB. 13

如果您的应用程序由于"正常"原因确实需要超过60秒,您可以使用https://github.com/dblock/heroku-forward解决60秒启动时间限制.


sai*_*sjd 10

解决方案是我忘了在我的Procfile行中包含-p $ PORT.

在Procfile中更改:

web: bundle exec thin start
Run Code Online (Sandbox Code Playgroud)

web: bundle exec thin start -p $PORT
Run Code Online (Sandbox Code Playgroud)

这为我解决了这个问题.