jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.03k stars 339 forks source link

ipywidgets limited to 10mb upload #853

Open tsi-rnguyen opened 1 year ago

tsi-rnguyen commented 1 year ago

I am having issues uploading any file over 10mb using ipywidgets. I extended the tljh hub config by creating a py file with the below contents in /opt/tljh/config/jupyterhub_config.d/

c.NotebookApp.tornado_settings = {"websocket_max_message_size": 100 * 1024 * 1024}

However, upon reload, this didn't seem to take. I also tried starting a notebook with this config under my own notebook. But the upload limit appeared to be 10mb still.

jupyter notebook --config="ipywidgets.py" notebook.ipynb

There is no error message so it's a bit difficult to trace the issue. Are there any workarounds or fixes for this?

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

dealmeida-h commented 1 year ago

I also have the same problem. I tried the following settings patterns:

c.NotebookApp.tornado_settings = {"websocket_max_message_size": 100 1024 1024} c.JupyterHub.tornado_settings = {"websocket_max_message_size": 100 1024 1024} c.Voila.tornado_settings = {"websocket_max_message_size": 100 1024 1024}

This is my jupyter --version output:

Selected Jupyter core packages... IPython : 8.6.0 ipykernel : 6.18.0 ipywidgets : 8.0.2 jupyter_client : 7.4.7 jupyter_core : 5.0.0 jupyter_server : 1.23.2 jupyterlab : 3.5.0 nbclient : 0.7.0 nbconvert : 7.2.5 nbformat : 5.7.0 notebook : 6.5.2 qtconsole : not installed traitlets : 5.5.0

jupyterhub --version: 1.5.0

I also tested setting this with tljh-config set c.NotebookApp.tornado_settings, but no luck.

One thing that seems to be working is the ContainDS dashboard, but I think it operates differently (I think it sends the websocket_max_message_size argument in the command line when launching the dashboard).

Any help is appreciated.

Best,

Hugo

CagtayFabry commented 1 year ago

can you try adding these settings to the config files manually and restart? (I think this worked for me on an older install)

/opt/tljh/config/jupyterhub_config.d/jupyter_config.py

c.JupyterHub.tornado_settings = {"websocket_max_message_size": 100 * 1024 * 1024}

/opt/tljh/user/etc/jupyter/jupyter_notebook_config.py

# this settings should match c.JupyterHub.tornado_settings
c.NotebookApp.tornado_settings = {"websocket_max_message_size": 100 * 1024 * 1024}
dealmeida-h commented 1 year ago

It worked when I added the settings to /etc/jupyter/jupyter_notebook_config.py, as well as to the files proposed by @CagtayFabry. At least in my case, this is solved.

Best,