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

Running Notebooks/Terminals - Shutdown automatically after specified time #1300

Closed
shamsulbuddy opened this issue Apr 4, 2016 · 9 comments
Closed

Comments

@shamsulbuddy
Copy link

I am using Jupyter notebook in a multiuser mode , means many people are running their notebooks in their specified folders in a shared environment. One problem which I can see is that even if they logged out , their notebooks/terminals keeps on running forever , so every now and then I have to go the running tabs and "Shutdown" the notebooks and terminals manually. Is there a way with which we can shutdown the notebooks and terminal after a specified time ?

@takluyver
Copy link
Member

Do you mean you're using Jupyterhub? If so, there is a script here which can cull idle servers periodically:

https://github.com/jupyter/jupyterhub/blob/master/examples/cull-idle/cull_idle_servers.py

@Carreau Carreau added this to the no action milestone Apr 4, 2016
@shamsulbuddy
Copy link
Author

No its not Jupyterhub .. its just a normal single instance of Jupyter which is password protected and our whole team login to it using https://server-ip:8888/tree

@takluyver
Copy link
Member

OK. Then no, at present there is nothing like that, but we're talking about adding some functionality to make it possible, in #1241.

@JamiesHQ
Copy link
Member

@shamsulbuddy : We're doing a little housekeeping on our issue log and noticed this thread from 2016. Has this issue been resolved to your satisfaction and can it be closed? thanks!

@nabriis
Copy link

nabriis commented Aug 29, 2017

Hi,

I think this functionality should be implemented.
We are also running a multi user envoirment, with JupyterHub and shutting down idle servers.
However, if people keep working during the day, the number of open notebook kernels stacks up quite high.

Maybe a flag that could be set such that kernels for which there is no current browser tab open shuts down after a while. My experience is that most people shut down the browser tab and excpect the kernel to stop from this.

@takluyver takluyver modified the milestones: 5.1, Reference Aug 29, 2017
@takluyver
Copy link
Member

Culling idle kernels is coming in 5.1, see #2215.

@takluyver
Copy link
Member

Also #2498 for extra config options.

@bhavintandel
Copy link

@nabriis May I know, how exactly are you culling idle servers ?

@takluyver
Copy link
Member

From 5.3 (#2963), it should be possible to cull idle servers with config like this:

c.MappingKernelManager.cull_idle_timeout = 600
c.NotebookApp.shutdown_no_activity_timeout = 600

The first option culls idle kernels after ten minutes. The second shuts down the server 10 minutes after the last kernel was shut down.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants