Terminal Manager cull properties not being applied to notebook config

Hi folks,
I’m running a z2jh installation with Amazon EKS and am using the cull properties of the notebook kernel and terminal instead of the hub culler for running long running jobs as suggested here

extraConfig: |
      c.Spawner.cmd = ['start.sh','jupyterhub-singleuser','--NotebookApp.shutdown_no_activity_timeout=3900','--MappingKernelManager.cull_idle_timeout=3600', '--MappingKernelManager.cull_interval=600', '--TerminalManager.cull_inactive_timeout=10800', '--TerminalManager.cull_interval=600']

However, I’m observing that the cull properties of the terminal do not work if I use a custom image built on top of docker-stack’s notebook images.
In an installation with docker-stacks notebook image, I can see the logs for the TerminalManager as

Polling every 600 seconds for terminals inactive for > 10800 seconds...

but not with the docker image I built from the same image. Can anyone point out if I’m doing something wrong which causes this behaviour?

1 Like

Thanks for this tip, I was looking for similar functionality, and your post pointed me in the right direction!
I dug into it and I think your problem is related to the fact that the functionality was added only in the 6.1 release, relatively recently. So depending on what version of the image you’re building from, it might not yet be implemented. See https://github.com/jupyter/notebook/pull/5372/

2 Likes

Thanks @bruwozniak
We were indeed using an image dating before the release of 6.1, but using a newer image for testing the Terminal culling. Glad this question helped you out!