Heroku R10启动超时错误 [英] Heroku R10 Boot Timeout Error

查看:309
本文介绍了Heroku R10启动超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Python中使用Bottle框架部署了Heroku上的一个小型Web应用程序。

  2013-12-25T17:53:23.098442 + 00:00我不知道为什么我在这里得到启动超时heroku [web.1]:用命令`python myapp.py`启动进程
2013-12-25T17:53:25.230922 + 00:00 app [web.1]:在http://127.0.0.1 :31150 /
2013-12-25T17:53:25.230695 + 00:00 app [web.1]:v0.11.6服务器启动(使用GeventServer())...
2013-12 -25T17:53:25.231052 + 00:00 app [web.1]:按Ctrl-C退出。
2013-12-25T17:53:25.231052 + 00:00 app [web.1]:
2013-12-25T17:54:13.434121 + 00:00 heroku [router]:at = error code = H20 desc =App boot timeoutmethod = GET path = / host = shrouded-spire-2869.herokuapp.com fwd =49.14.226.100dyno = connect = service = status = 503 bytes =
2013- 12-25T17:54:23.622928 + 00:00 heroku [web.1]:错误R10(启动超时) - > Web进程无法在启动60秒内绑定到$ PORT
2013-12-25T17:54:23.623289 + 00:00 heroku [web.1]:用SIGKILL停止进程
2013-12-25T17 :54:24.890546 + 00:00 heroku [web.1]:进程退出,状态为137
2013-12-25T17:54:24.901419 + 00:00 heroku [web.1]:状态从开始变为崩溃
2013-12-25T17:54:26.867178 + 00:00 heroku [router]:at = error code = H10 desc =App crashedmethod = GET path = / favicon.ico host = shrouded-spire-2869 .herokuapp.com fwd =106.78.169.174dyno = connect = service = status = 503 bytes =
2013-12-25T17:53:36.038209 + 00:00 heroku [router]:at = error code = H20 desc =App boot timeoutmethod = GET path = / host = shrouded-spire-2869.herokuapp.com fwd =49.14.226.100dyno = connect = service = status = 503 bytes =


$ b

这是myapp.py:

  import gevent.monkey; gevent.monkey.patch_all()
导入瓶
导入请求
从pyquery导入PyQuery作为p $
导入os

#其余代码

run(server ='gevent',port = os.environ.get('PORT',5000))

有什么想法?

解决方案

您正在监听 127.0.0.1 ,而不是在您的公共IP上。在 run()中调用 host ='0.0.0.0'


I have deployed a small web app on Heroku made using Bottle framework in Python. I have no clue why I am getting the boot timeout here -

2013-12-25T17:53:23.098442+00:00 heroku[web.1]: Starting process with command `python myapp.py`
2013-12-25T17:53:25.230922+00:00 app[web.1]: Listening on http://127.0.0.1:31150/
2013-12-25T17:53:25.230695+00:00 app[web.1]: Bottle v0.11.6 server starting up (using GeventServer())...
2013-12-25T17:53:25.231052+00:00 app[web.1]: Hit Ctrl-C to quit.
2013-12-25T17:53:25.231052+00:00 app[web.1]: 
2013-12-25T17:54:13.434121+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=shrouded-spire-2869.herokuapp.com fwd="49.14.226.100" dyno= connect= service= status=503 bytes=
2013-12-25T17:54:23.622928+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2013-12-25T17:54:23.623289+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-12-25T17:54:24.890546+00:00 heroku[web.1]: Process exited with status 137
2013-12-25T17:54:24.901419+00:00 heroku[web.1]: State changed from starting to crashed
2013-12-25T17:54:26.867178+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=shrouded-spire-2869.herokuapp.com fwd="106.78.169.174" dyno= connect= service= status=503 bytes=
2013-12-25T17:53:36.038209+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=shrouded-spire-2869.herokuapp.com fwd="49.14.226.100" dyno= connect= service= status=503 bytes=

This is myapp.py :

import gevent.monkey; gevent.monkey.patch_all()
import bottle
import requests
from pyquery import PyQuery as pq
import os

# Rest of the code here

run(server='gevent', port=os.environ.get('PORT', 5000))

Any idea?

解决方案

You are listening on 127.0.0.1, instead of on your public IP. Use host='0.0.0.0' in your call to run().

这篇关于Heroku R10启动超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆