Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection lost after (about) one minute #366

Closed
imerelli opened this issue Sep 27, 2024 · 4 comments · Fixed by jupyter-server/jupyverse#442
Closed

Connection lost after (about) one minute #366

imerelli opened this issue Sep 27, 2024 · 4 comments · Fixed by jupyter-server/jupyverse#442
Labels
bug Something isn't working

Comments

@imerelli
Copy link

imerelli commented Sep 27, 2024

Hi, when using Jupyter-collaboration on Jupyverse, it seems that staying disconnected for more than about 60 seconds while computing causes the connection to the server to be lost. I’ve done some tests to confirm this. If the page is kept open, everything works fine. If you disconnect for 30 seconds, it works fine. If you stay disconnected for some minutes but the computation lasts for less than 60 seconds, it still works fine. But beyond about 60 seconds of computation in which you are disconnected, the connection that returns the output is lost. Is it possible that there’s an intrinsic timeout somewhere? I’m attaching a screenshot of what happens. I lunched the code, disconnected after few seconds and then reconnected after some minutes, in the first case the output is truncated, while in the second the output is fine.

Screenshot 2024-09-27 at 12 41 38 Screenshot 2024-09-27 at 12 42 13

Here my configuration (and thanks again for the help in setting this up).

pip list | grep jupy
fps_jupyterlab              0.6.2
jupyter_client              8.6.3
jupyter-collaboration       3.0.0b6
jupyter-collaboration-ui    1.0.0b6
jupyter_core                5.7.2
jupyter-docprovider         1.0.0b6
jupyter-events              0.10.0
jupyter-lsp                 2.2.5
jupyter_server              2.14.2
jupyter_server_fileid       0.9.3
jupyter_server_terminals    0.5.3
jupyter-server-ydoc         1.0.0b6
jupyter-ydoc                3.0.0a8
jupyterlab                  4.2.5
jupyterlab_pygments         0.3.0
jupyterlab_server           2.27.3
jupyverse                   0.6.2
jupyverse_api               0.6.2
@imerelli imerelli added the bug Something isn't working label Sep 27, 2024
@davidbrochart
Copy link
Collaborator

Why are you using pre-releases of jupyter-collaboration and jupyter-ydoc?
Also, how do you launch jupyverse?

@imerelli
Copy link
Author

imerelli commented Sep 27, 2024

I tested the pre-leases because I thought it could help in solving the issues I have. Below the steps I used for the installation using standard releases of jupyter-collaboration and jupyter-ydoc:

mamba create --name jupyter3 python==3.10

source activate jupyter3

pip install "jupyverse[jupyterlab, auth]"

pip install --upgrade --pre jupyter-collaboration

pip install matplotlib

pip list | grep jupy
fps_jupyterlab              0.6.2
jupyter_client              8.6.3
jupyter_collaboration       2.1.2
jupyter_core                5.7.2
jupyter-events              0.10.0
jupyter-lsp                 2.2.5
jupyter_server              2.14.2
jupyter_server_fileid       0.9.3
jupyter_server_terminals    0.5.3
jupyter-ydoc                2.1.1
jupyterlab                  4.2.5
jupyterlab_pygments         0.3.0
jupyterlab_server           2.27.3
jupyverse                   0.6.2
jupyverse_api               0.6.2

jupyverse --host 0.0.0.0 --port 80 --set kernels.require_yjs=true --set jupyterlab.server_side_execution=true

The problem is the same, see attachment.

Screenshot 2024-09-27 at 18 56 26

Maybe I'm doing something wrong, but, in case, it is not clear to me what.
Your help is really appreciated.

@davidbrochart
Copy link
Collaborator

Thanks for reporting the issue. I opened jupyter-server/jupyverse#442 which allows configuring the document cleanup delay. It was indeed hard-coded to 60 seconds, that's why you were observing connection loss. To avoid that behavior, you will have to launch jupyverse with the new document_cleanup_delay set to e.g. "inf":

jupyverse --set kernels.require_yjs=true --set jupyterlab.server_side_execution=true --set yjs.document_cleanup_delay="inf"

@davidbrochart
Copy link
Collaborator

I released jupyverse v0.6.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants