2

Well.. I'm trying to do exactly the same thing as in this post Serving interactive bokeh figure on heroku Which would seem like a duplicate except that I can't get that to work.

Namely, running Bokeh's movies example ( github ).

Here is my 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

And here is my Procfile, which references a copy movies_local of the directory from bokeh/examples/app/movies , that is located in the app directory:

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

It works OK when I run heroku local but times out when I try to deploy it. My lightly edited logs are:

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

Sorry, but I am pretty new to heroku & web stuff overall. Thank you so much for any insights.

Community
  • 1
  • 1
phdscm
  • 233
  • 1
  • 8
  • I'm having exactly the same issue. I've asked Heroku support and I'll let you know if they get back to me. – EddyTheB May 25 '17 at 14:52

2 Answers2

2

I had this exact same issue trying to deploy a Bokeh App using Heroku. I was finally able to deploy the app after downgrading tornado to version 4.4.2 in my requirements.txt. The issue I believe was caused by the fact that the Bokeh server is currently not compatible with tornado=4.5.

Here is what my requirements.txt file ended up looking like:

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

I hope this helps.

ajagdev
  • 36
  • 2
1

Tornado 4.5.x is incompatible with all version of Bokeh up to 0.12.5 (It came out with the breaking change after 0.12.5 was released). You can either:

  • upgrade your Bokeh version to 0.12.6
  • downgrade Tornado to < 4.5
bigreddot
  • 33,642
  • 5
  • 69
  • 122