JupyterHub user processes aren't properly terminated #123

Closed
opened 2022-03-11 03:38:32 +00:00 by a · 4 comments
Owner

For some reason, there are a lot of leftover JupyterHub user processes if you check using htop or ps. They don't really do much but are kind of annoying and take up memory. We currently terminate JupyterLab servers using the idle culler after one hour of inactivity, but apparently not all the processes are terminated.

For some reason, there are a lot of leftover JupyterHub user processes if you check using `htop` or `ps`. They don't really do much but are kind of annoying and take up memory. We currently terminate JupyterLab servers using the [idle culler](https://github.com/jupyterhub/jupyterhub-idle-culler) after one hour of inactivity, but apparently not all the processes are terminated.
a added the
bug
label 2022-03-11 03:38:32 +00:00
a added this to the (deleted) project 2022-03-11 03:38:35 +00:00
a self-assigned this 2022-03-11 03:38:40 +00:00
a started working 2022-03-11 03:47:55 +00:00
Author
Owner

Yeah, this is a pretty serious memory leak. Currently leaking about 5GB of memory due to this.

Yeah, this is a pretty serious memory leak. Currently leaking about 5GB of memory due to this.
Author
Owner

I added

# shutdown the server after no activity for 20 minutes
c.NotebookApp.shutdown_no_activity_timeout = 20 * 60
# shutdown kernels after no activity for 10 minutes
c.MappingKernelManager.cull_idle_timeout = 10 * 60
# Check every minute
c.MappingKernelManager.cull_interval = 60
# cull connected (e.g. Browser tab open)
c.MappingKernelManager.cull_connected = True

to /etc/jupyter/jupyter_notebook_config.py, hopefully that fixes it.

I added ``` # shutdown the server after no activity for 20 minutes c.NotebookApp.shutdown_no_activity_timeout = 20 * 60 # shutdown kernels after no activity for 10 minutes c.MappingKernelManager.cull_idle_timeout = 10 * 60 # Check every minute c.MappingKernelManager.cull_interval = 60 # cull connected (e.g. Browser tab open) c.MappingKernelManager.cull_connected = True ``` to `/etc/jupyter/jupyter_notebook_config.py`, hopefully that fixes it.
a stopped working 2022-03-11 04:14:09 +00:00
26min 14s
Author
Owner

Leaving a JupyterHub server open right now, I'll check back tomorrow morning to see if this has been fixed.

Leaving a JupyterHub server open right now, I'll check back tomorrow morning to see if this has been fixed.
Author
Owner

This should be fixed now.

This should be fixed now.
a closed this issue 2022-03-11 14:31:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Total time spent: 26 minutes 14 seconds
a
26 minutes 14 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: exozyme/exozyme#123
No description provided.