How to deploy a bokeh server app on Heroku?

Hi,

I tried to deploy a simple bokeh server app on Heroku in the same way I deploy Flask apps with the only difference being the Procfile. Instead of adding the usual gunicorn line:

web: gunicorn app:app

``

I added this instead:

web: bokeh serve app.py

``

File app.py contains the Python code I referenced in the link above. The code works well on my local computer when I execute it with bokeh serve app.py.

However, I am getting an application error on the app webpage.

Here is the tail of my Heroku logs:

2016-07-17T12:32:18.472445+00:00 app[web.1]: WARNING:/app/.heroku/python/lib/pyt
hon3.5/site-packages/bokeh/core/validation/check.py:W-1004 (BOTH_CHILD_AND_ROOT)
: Models should not be a document root if they are in a layout box: Figure, View
Model:Plot, ref _id: 25082380-c412-46a4-a96d-c897e55e063b
2016-07-17T12:32:19.466925+00:00 heroku[web.1]: Process exited with status 0
2016-07-17T12:32:19.481993+00:00 heroku[web.1]: State changed from starting to c
rashed
2016-07-17T12:32:53.433502+00:00 heroku[router]: at=error code=H10 desc=“App cra
shed” method=GET path="/" host=bokehapp.herokuapp.com request_id=d1a01aec-f20d-4
a9f-8fbc-0ebcf52b01ef fwd=“217.73.139.64” dyno= connect= service= status=503 byt
es=

``

I also tried web: python app.py in the Procfile, but got the same error.

Anyone willing to help?

Unfortunately I'm not familiar with Heroku. I will note that in general, of you are behind some proxy (as seems to be the case here?) then you will have to enable forwarding/proxying of websockets in order for the server to function. There are examples of how to do this with Apache and NGinx in the user's guide. Do you have access to the bokeh server console logs? That would provide additional information that would help diagnose your problem.

Thanks,

Bryan

···

On Jul 17, 2016, at 7:48 AM, Adi <[email protected]> wrote:

Hi,

I tried to deploy a simple bokeh server app on Heroku in the same way I deploy Flask apps with the only difference being the Procfile. Instead of adding the usual gunicorn line:

web: gunicorn app:app

I added this instead:

web: bokeh serve app.py

File app.py contains the Python code I referenced in the link above. The code works well on my local computer when I execute it with bokeh serve app.py.

However, I am getting an application error on the app webpage.

Here is the tail of my Heroku logs:

2016-07-17T12:32:18.472445+00:00 app[web.1]: WARNING:/app/.heroku/python/lib/pyt
hon3.5/site-packages/bokeh/core/validation/check.py:W-1004 (BOTH_CHILD_AND_ROOT)
: Models should not be a document root if they are in a layout box: Figure, View
Model:Plot, ref _id: 25082380-c412-46a4-a96d-c897e55e063b
2016-07-17T12:32:19.466925+00:00 heroku[web.1]: Process exited with status 0
2016-07-17T12:32:19.481993+00:00 heroku[web.1]: State changed from starting to c
rashed
2016-07-17T12:32:53.433502+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=bokehapp.herokuapp.com request_id=d1a01aec-f20d-4
a9f-8fbc-0ebcf52b01ef fwd="217.73.139.64" dyno= connect= service= status=503 byt
es=

I also tried web: python app.py in the Procfile, but got the same error.

Anyone willing to help?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c4a98c1d-7104-4684-9c42-2008908939b3%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thank you, Brian. Luckily I found a stackoverflow answer that was posted only yesterday about deploying a bokeh server app on Heroku: http://stackoverflow.com/a/38447618/1585017

···

On Tuesday, July 19, 2016 at 3:54:03 PM UTC+2, Bryan Van de ven wrote:

Unfortunately I’m not familiar with Heroku. I will note that in general, of you are behind some proxy (as seems to be the case here?) then you will have to enable forwarding/proxying of websockets in order for the server to function. There are examples of how to do this with Apache and NGinx in the user’s guide. Do you have access to the bokeh server console logs? That would provide additional information that would help diagnose your problem.

Thanks,

Bryan

On Jul 17, 2016, at 7:48 AM, Adi [email protected] wrote:

Hi,

I tried to deploy a simple bokeh server app on Heroku in the same way I deploy Flask apps with the only difference being the Procfile. Instead of adding the usual gunicorn line:

web: gunicorn app:app

I added this instead:

web: bokeh serve app.py

File app.py contains the Python code I referenced in the link above. The code works well on my local computer when I execute it with bokeh serve app.py.

However, I am getting an application error on the app webpage.

Here is the tail of my Heroku logs:

2016-07-17T12:32:18.472445+00:00 app[web.1]: WARNING:/app/.heroku/python/lib/pyt

hon3.5/site-packages/bokeh/core/validation/check.py:W-1004 (BOTH_CHILD_AND_ROOT)

: Models should not be a document root if they are in a layout box: Figure, View

Model:Plot, ref _id: 25082380-c412-46a4-a96d-c897e55e063b

2016-07-17T12:32:19.466925+00:00 heroku[web.1]: Process exited with status 0

2016-07-17T12:32:19.481993+00:00 heroku[web.1]: State changed from starting to c

rashed

2016-07-17T12:32:53.433502+00:00 heroku[router]: at=error code=H10 desc="App cra

shed" method=GET path="/" host=bokehapp.herokuapp.com request_id=d1a01aec-f20d-4

a9f-8fbc-0ebcf52b01ef fwd=“217.73.139.64” dyno= connect= service= status=503 byt

es=

I also tried web: python app.py in the Procfile, but got the same error.

Anyone willing to help?


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c4a98c1d-7104-4684-9c42-2008908939b3%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.