Panel serve command does not respect websocket max message size. I have tested the same code with a pandas dataframe that takes 9.2MB memory and panel works fine. However, when I increase the size to 13MB, websocket connection is automatically closed. In both cases, the app was launched with 200MB max allowed message size. See the screenshot. In both cases, the app was launched with the following command panel serve testing_passing_raw.py --autoreload --port 8501 --allow-websocket-origin=jupyterhub-xxxxxx.com --websocket-max-message-size=209715200
Here’s the output from the screen (sorry I am only allowed to upload one image as a new user).
Can someone please help me understand and solve the issue?
================================================================================
2024-02-01 01:56:28,487 Starting Bokeh server version 3.1.1 (running on Tornado 6.2)
2024-02-01 01:56:28,488 Torndado websocket_max_message_size set to 209715200 bytes (200.00 MB)
2024-02-01 01:56:28,488 User authentication hooks NOT provided (default user enabled)
2024-02-01 01:56:28,490 Bokeh app running at: http://localhost:8501/testing_passing_raw
2024-02-01 01:56:28,490 Starting Bokeh server with process id: 1666
================================================================================
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 600000 entries, 0 to 599999
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 A 600000 non-null int64
1 B 600000 non-null int64
2 C 600000 non-null int64
dtypes: int64(3)
memory usage: 13.7 MB
It is running on JupyterHub deployment. I tested the same code on my local after @ahuang11 kindly responded that it worked on his end, and it is working fine on my local too. You’re probably right in saying JupyterHub might be causing this!
Any pointers on how to fix this? I will start googling while awaiting your suggestion.