opened 09:37AM - 05 Jan 18 UTC
closed 01:06AM - 05 Jun 18 UTC
type: task
reso: completed
tag: component: server
Recently I came across a problem with sending lots of data to a bokeh server, be…tween 20 - 50 MB. The command I used was
```
bokeh serve data_visualisation --show --args -i path_to_large_file
```
What would happen is that my plot would render, and then almost instantly a timeout would occur so no communication between the browser and server was possible:
```
2018-01-05 10:19:58,280 200 GET /data_visualisation (::1) 9227.38ms
2018-01-05 10:19:58,455 101 GET /data_visualisation/ws?bokeh-protocol-version=1.0&bokeh-session-id=jbQmzoBZbYDBDUdi5Ix6QShbAJtAMGPhmKvC1SWjOuwA (::1) 0.87ms
2018-01-05 10:19:58,455 WebSocket connection opened
2018-01-05 10:19:58,456 ServerConnection created
2018-01-05 10:21:28,512 WebSocket connection closed: code=None, reason=None
```
In the browser console, the following errors where shown:
```
[bokeh] Lost websocket 0 connection, 1006 () connection.js:221
[bokeh] Websocket connection 0 disconnected, will not attempt to reconnect connection.js:105
```
The problem was solved by editing tornado.py by changing the rule on line 221
```super(BokehTornado, self).__init__(all_patterns)```
to
``` super(BokehTornado, self).__init__(all_patterns, websocket_max_message_size=50 * 1024 * 1024) ```
By default, the maximum socket message size is 10MiB for the used version of Tornado, and would disconnect for this reason. A more meaningful error message or the possibility to change this value in bokeh would be appreciated.
#### Software version info
bokeh==0.12.13
Tornado==4.5.2
python==3.6.3
MacOS High Sierra (10.13.2)
Any browser (Chrome (63.0.3239.84) / Safari / Firefox)