-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Cull idle kernels #6893
Comments
I didn't know about this option. However, here's my guess about what is happening. In the classic notebook, closing a notebook is actually closing the browser tab and all javascript that was keeping a websocket open, so there is no connection to the kernel, so the culling can happen. However, in JLab the connection to the kernel is maintained in global state, and since closing a notebook in jlab is not closing the browser tab, that global state stays around, hence the websocket connection stays around. To close a notebook's kernel connection, go to the running tab and hit "shutdown". So I think that the model doesn't map very well to JupyterLab, which is a single-page application managing multiple kernel connections. Here are a couple of options (using some jlab-specific technical terms):
|
Thanks for this quick response @jasongrout ! I experienced a similar behaviour with the I'm using these options through jupyterhub where it's pretty important to manage kernels and servers to spare resources..! Do you agree these options should stay available? Since it's possible to switch between classic notebook and lab, I would say that the behaviour of the options have to be strictly similar. The 2nd option would introduce such a different behaviour. Are you OK with that @jasongrout ? |
I'm just clarifying 8000 that the option is still available, just that JLab is maintaining the connection so the behavior isn't triggered. |
Setting as 1.1 so we can discuss what we'd like to do with JupyterLab keeping connections open after documents are closed (note this is not about shutting down kernels, just about keeping websocket connections live). |
Thanks! I saw possible related issues : #5914, #6142
|
Pleaseany update on this issue? |
In case this info is useful reference... Culling as handled by the idle-culler project will happily cull JLab servers that do not maintain an active browser connection, it seems. (related- I've opened this issue because I cannot seem to configure Nevertheless, the more fine-grained management allowed by the configurations mentioned here would be very useful- allowing users to close their web connection and allow JLab servers to continue to run processes and only be culled when those processes finish. So anyway, just wanted to mention the idle-culler for reference and add a +1 for this feature request. |
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/cull-kill-idle-jupyterhub-notebooks/10858/2 |
+1 |
Hi
You will find hereafter a short description of what I think to be a bug.
Thanks for your amazing job!
bug description
The classic notebook
cull_connected
option seems to be not well handled by jupyterlab. Even when a notebook if closed, the kernel won't be culled if thecull_connected
option is set to False. If set to True, the behaviour is as expected.steps to reproduce
setup a fresh env with the following packages
create a jupyter_notebook_config.py at ~/.jupyter/ with the options listed bellow
-- c.MappingKernelManager.cull_connected = False
-- c.MappingKernelManager.cull_idle_time = 20
-- c.MappingKernelManager.cull_interval = 20
launch the classic notebook with
jupyter notebook
create 2 new notebooks and close only one of the two
check the logs in your console, the kernel of the closed notebook will be culled but not the other one
reproduce with jupyterlab lauching
jupyter lab
see that the kernel of the closed notebook is never culled
env
-- jupyterlab = 1.0.2
-- jupyterlab_server = 1.0.0
-- jupyter_core = 4.5.0
-- jupyter_client = 5.3.1
-- notebook = 6.0.0
Could you please have a look to this case?
Don't hesitate if I missed a point..!
Thank you !
The text was updated successfully, but these errors were encountered: