Heroku运行散景服务器 - H12超时

时间:2017-05-04 21:33:43

标签: python heroku bokeh

嗯..我试图做与此帖Serving interactive bokeh figure on heroku完全相同的事情 这似乎是重复的,除非我无法使用它。

即,运行Bokeh' movies examplegithub)。

这是我的requirements.txt:

dj-database-url==0.4.1
Django==1.9.7
gunicorn==19.6.0
psycopg2==2.6.2
whitenoise==2.0.6
requests==2.9.1
bokeh==0.12.2
appdirs==1.4.3
pandas==0.18.0
six >=1.5.2
PyYAML >=3.10
python-dateutil >=2.1
Jinja2 >=2.7
numpy >=1.7.1
tornado >=4.3

这是我的Procfile,它引用了位于app目录中的bokeh / examples / app / movies目录的副本movies_local

web: bokeh serve --port=$PORT --host=sitename.herokuapp.com --host=localhost:5000 --address=0.0.0.0 --use-xheaders movies_local/main.py

当我运行heroku local时工作正常,但在我尝试部署它时会超时。我轻微编辑的日志是:

2017-05:00 heroku[web.1]: Starting process with command `bokeh serve --port=19727 --host=sitename.herokuapp.com --host=localhost:5000 --address=0.0.0.0 --use-xheaders movies_local/main.py`
2017-05:00 heroku[web.1]: State changed from starting to up
2017-05:00 app[web.1]: 2017-05-04 21:23:40,315 Starting Bokeh server version 0.12.2
2017-05:00 app[web.1]: 2017-05-04 21:23:40,341 Starting Bokeh server on port 19727 address 0.0.0.0 with applications at paths ['/main']
2017-05:00 app[web.1]: 2017-05-04 21:23:40,342 Starting Bokeh server with process id: 4
2017-05:00 heroku[router]: at=info method=GET path="/" host=sitename.herokuapp.com request_id=3d86a460-cfa0-4d22-bb0e-2b984527fa8b fwd="47.16.208.6" dyno=web.1 connect=1ms service=3ms status=302 bytes=164 protocol=https
2017-05:00 app[web.1]: 2017-05-04 21:23:43,099 302 GET / (47.16.208.6) 1.03ms
2017-05:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/main" host=sitename.herokuapp.com request_id=35ca7816-6956-44b9-9d97-b8b27c273244 fwd="47.16.208.6" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0 protocol=https

抱歉,但我对heroku& amp;整体的网络东西。非常感谢您的任何见解。

2 个答案:

答案 0 :(得分:2)

我尝试使用Heroku部署Bokeh应用程序时遇到了同样的问题。在我的requirements.txt中将龙卷风降级到版本4.4.2后,我终于能够部署该应用程序。我认为这个问题是因为Bokeh服务器目前与tornado = 4.5不兼容。

这是我的requirements.txt文件最终看起来像:

bokeh==0.12.5
certifi==2017.4.17
chardet==3.0.4
idna==2.5
Jinja2==2.9.6
MarkupSafe==1.0
numpy==1.12.1
pandas==0.20.1
python-dateutil==2.6.0
pytz==2017.2
PyYAML==3.12
requests==2.18.1
six==1.10.0 
tornado==4.4.2
urllib3==1.21.1
xlrd==1.0.0

我希望这会有所帮助。

答案 1 :(得分:1)

Tornado 4.5.x与所有版本的Bokeh都不兼容0.12.5(它在0.12.5发布后发生了重大变化)。你可以:

  • 将您的Bokeh版本升级为0.12.6
  • 将龙卷风降级为< 4.5
相关问题