Skip to content

JupyterHub: keep notebooks across hub restarts, stop idle notebooks - #27

Merged
KFilippopolitis merged 2 commits into
masterfrom
feat/hub-keep-servers
Oct 23, 2026
Merged

KFilippopolitis merged 2 commits into
masterfrom
feat/hub-keep-servers

Conversation

@KFilippopolitis

@KFilippopolitis KFilippopolitis commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Two JupyterHub settings for the chart. Both need the hub image from the related mip-jupyter PR; older hub images ignore them.

  • Keep notebooks running across hub restarts (JUPYTERHUB_CLEANUP_SERVERS=false). The hub database already lives on jupyterhub-claim0, so a restarted hub picks running servers up again. Hub updates no longer kick users out of their notebooks or force a new login.
  • Stop idle notebooks. New values jupyterhub.cullIdleTimeout (default 3600 seconds, 0 = never) and jupyterhub.cullEvery (default 600). They run the hub's idle culler. Files stay on the user's volume; open tabs, running cells and the AI chat count as activity.

How it was tested

  • helm template renders both env vars; cullIdleTimeout=0 renders "0" (culler off).
  • On federation-handson, with the same settings applied by hand:
    • a hub restart left the running notebook pod untouched and re-routed it;
    • the idle culler started and queries the hub API successfully.

Related PRs

The hub database is already on jupyterhub-claim0, so the hub can leave user
servers running when it restarts and pick them up again.
jupyterhub.cullIdleTimeout (default 3600s, 0 = never) and cullEvery (600s)
drive the hub's idle culler. User files stay on their volume.

@ThanKarab ThanKarab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@KFilippopolitis
KFilippopolitis merged commit 7b5f668 into master Oct 23, 2026
3 checks passed
@KFilippopolitis
KFilippopolitis deleted the feat/hub-keep-servers branch October 23, 2026 11:04
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