Notebook server NOT stopped on logout if cookies have expired?

I have checked that a notebook server is NOT stopped on logout (shutdown_on_logout = True) if cookies have expired
Case of a notebook running since weeks (> cookie_max_age_days = 14 days)

This can be shown for example, by reseting cookies in the browser
Is this behaviour expected ? Do I miss something ?

I would like to test if /hub/logout was invoked or not , but I can’t get a logout handler working


Have you installed the idle culler?

Thank you for your help, unless I missed something, it seems to me that ‘idle culler’ address another requirement … but to answer your question, yes I installed jupyterhub-idle-culler tool several months ago.
To rephrase the problem I pointed out :

  • run a JupyterLab notebook , launched from JupyterHub (using OAuth in my case)
  • in your browser, reset cookies related to the host server (Preferences …)
  • in JupyterLab, do File > Log Out,
    your notebook server is NOT stopped (= the spawner is NOT stopped = the post_stop_hook method is NOT invoked !)

(Obviously, every works well as expected if cookies have not expired)


If your cookie has expired wouldn’t that mean you’re no longer authenticated? So your browser is no longer authorised to send the logout/shut-down message?