我在Heroku中运行我的Python应用程序时遇到问题。我的应用程序在网站上搜索天气数据并对其进行一些计算。拉数据不会超过几秒钟。当我打开我的应用程序时,我的日志显示我的应用程序的输出,但我的应用程序页面继续加载,直到我收到R10错误,然后应用程序页面崩溃。我可以使用命令行中的一次性dyno运行我的应用程序就好了。这是我的日志:
2016-08-18T13:58:34.073915+00:00 heroku[web.1]: Starting process with command `python WebScraper.py`
2016-08-18T13:58:40.982330+00:00 app[web.1]: http://170.94.200.136/weather/Inversion.aspx
2016-08-18T13:58:41.005187+00:00 app[web.1]: Station Low Temp (F) Time of Low Current Temp (F) Current Time \
2016-08-18T13:58:41.005202+00:00 app[web.1]: 0 0.0 0 74.3 8:49 AM
2016-08-18T13:58:41.005205+00:00 app[web.1]: Arkansas: no inversion and spray OK
2016-08-18T13:59:34.319236+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-08-18T13:59:34.319458+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-08-18T13:59:34.443283+00:00 heroku[web.1]: Process exited with status 137
2016-08-18T13:59:34.459932+00:00 heroku[web.1]: State changed from starting to crashed
2016-08-18T13:59:34.460745+00:00 heroku[web.1]: State changed from crashed to starting
2016-08-18T13:59:39.598773+00:00 heroku[web.1]: Starting process with command `python WebScraper.py`
2016-08-18T13:59:46.087192+00:00 app[web.1]: http://170.94.200.136/weather/Inversion.aspx
2016-08-18T13:59:46.099928+00:00 app[web.1]: Station Low Temp (F) Time of Low Current Temp (F) Current Time \
2016-08-18T13:59:46.100543+00:00 app[web.1]: Ashley: strong inversion and no spray suggested
2016-08-18T14:00:07.473438+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=temperature-inversion.herokuapp.com request_id=c477a7b2-d755-475a-ad11-f857764386b6 fwd="199.133.80.68" dyno= connect= service= status=503 bytes=
2016-08-18T14:00:39.933670+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-08-18T14:00:39.933712+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-08-18T14:00:40.095100+00:00 heroku[web.1]: State changed from starting to crashed
2016-08-18T14:00:40.079022+00:00 heroku[web.1]: Process exited with status 137
2016-08-18T14:00:42.882673+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=temperature-inversion.herokuapp.com request_id=c5ee4daf-9825-4c53-8f9c-852b9a3eaae2 fwd="199.133.80.68" dyno= connect= service= status=503 bytes=
2016-08-18T14:00:44.549938+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=temperature-inversion.herokuapp.com request_id=f45183be-4b77-429e-91be-dfcf832ec3ca fwd="199.133.80.68" dyno= connect= service= status=503 bytes=
答案 0 :(得分:0)
Heroku希望web
进程在60秒内绑定到$PORT
。您需要在Procfile中使用不同类型的流程(例如bot
)并缩放不同的流程(类似于Python Twitter Bot w/ Heroku Error: R10 Boot Timeout)