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

Add kernel culling and server shutdown timeouts #34

Merged
merged 1 commit into from
Jun 21, 2019
Merged

Conversation

jtpio
Copy link
Member

@jtpio jtpio commented Jun 21, 2019

A different and perhaps simpler approach to shutting down idle servers (compared to #33)

The notebook server shuts itself down after a period of inactivity instead of being actively culled by the hub.

This should also be similar to what mybinder.org is currently doing: https://github.com/jupyterhub/mybinder.org-deploy/blob/ddabade54008c2fcdf936812eabff3c0093362d5/mybinder/values.yaml#L8-L22

cmd = 'jupyter-notebook'

# rm containers when they stop
remove = True
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not picked up when the server is shut down (still shows in docker ps -a).

Probably because it is used only when its stop method is called, not when the notebook server (pid 1) stops.

@yuvipanda
Copy link
Contributor

It's one of the things mybinder.org uses - we still run the culler since we want to delete the active users as well once their servers stop. Otherwise we'll end up with a ton of them in our sqlite db...

This is a good call in the interim though.

@yuvipanda yuvipanda merged commit f67a373 into master Jun 21, 2019
@jtpio
Copy link
Member Author

jtpio commented Jun 21, 2019

True.

For reference, the change to enable the auto remove of the Docker containers when the process exits (on the daemon side): jupyterhub/dockerspawner#318.

(At the moment the containers are stopped but not removed)

@jtpio jtpio deleted the server-shutdown branch June 21, 2019 18:16
@jtpio jtpio mentioned this pull request Jun 26, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants