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

[bug] Idle culler doesn't appear to be working properly #974

Closed
1 task
kcpevey opened this issue Dec 16, 2021 · 5 comments · Fixed by #1133
Closed
1 task

[bug] Idle culler doesn't appear to be working properly #974

kcpevey opened this issue Dec 16, 2021 · 5 comments · Fixed by #1133
Assignees
Labels
needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Dec 16, 2021

Describe the bug

  • We have the idle culler set to 30 minutes. But after this time period, the server is still running. This happens when the browser is minimized and when there isn't anything obviously actively running.

Expected behaviour

  • I expect that after 30 minutes of not touching my browser window (leaving it minimized), my server should be culled

Actual behaviour

  • after 30 minutes of not touching my browser window (leaving it minimized), my server is not culled

How to reproduce

For example,

  1. load up a server
  2. run a cell in a notebook with only imports (nothing obviously continuously running).
  3. minimize the window
  4. come back after the idle-culller-timeout
  5. run another cell in that notebook
  6. the server is still live.

Your personal set up

OS

  • * OSX
@trallard trallard added type: bug 🐛 Something isn't working needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug labels Dec 17, 2021
@trallard trallard moved this to Needs Triage in QHub Project Mangement 🚀 Dec 17, 2021
@danlester
Copy link
Contributor

Note that I did notice idle culler was missing from the jupyterhub image, and added it in here recently:

#959

I haven't studied things in enough detail yet to see if that solves all of your problems...

Be aware that by default cdsdashboards actually tries to 'fake' activity: https://cdsdashboards.readthedocs.io/en/stable/chapters/troubleshooting.html#dashboards-and-servers-keep-dying

I'm sure this has come up before though.

@leej3
Copy link
Contributor

leej3 commented Jan 24, 2022

I think another source of the problem is that the idle culler has different behavior for jupyterlab. From the readme:

Note that cull_connected can be tricky to understand for JupyterLab as a browser having a web-socket
 connection to a kernel or not isn't as obvious as it was in the classical Jupyter notebook UI.
 [See this issue for more details](https://github.com/jupyterlab/jupyterlab/issues/6893).

@dharhas
Copy link
Member

dharhas commented Feb 17, 2022

@magsol this probably needs to be investigated for the 0.4 release. From what I can tell it is an issue on the demo deployment I have access to.

@costrouc costrouc added this to the Release v0.4.0 milestone Feb 17, 2022
@costrouc
Copy link
Member

@viniciusdc is going to test that the idle culler has been working in 0.4 and detailing in the docs better what the idle culler does.

@viniciusdc
Copy link
Contributor

viniciusdc commented Feb 25, 2022

The ide culler is working as expected, but it has some issues when running alongside jupyterhub, as the browser windows actually open a WebSocket connection that generates a false positive, not idle status, as pointed out by @leej3 above.

I am currently working on a fix to address kernel and idle connections for v0.4... Besides that, login out from the server definitely triggers the culling process after the timeout period (the example bellow had its cull_timeout variable modified for testing):

[I 2022-02-25 20:22:46.932 JupyterHub log:189] 200 GET /hub/api/users (cull-idle@127.0.0.1) 29.73ms
[I 220225 20:22:46 __init__:192] Culling server bob (inactive for 00:27:49)
[I 2022-02-25 20:22:46.939 JupyterHub proxy:309] Removing user bob from proxy (/user/bob/)
[I 2022-02-25 20:22:46.942 JupyterHub spawner:2620] Deleting pod dev/jupyter-bob
[I 2022-02-25 20:22:48.867 JupyterHub base:1116] User bob server took 1.928 seconds to stop
[I 2022-02-25 20:22:48.869 JupyterHub log:189] 204 DELETE /hub/api/users/bob/server (cull-idle@127.0.0.1) 1934.65ms   

Repository owner moved this from Needs Triage 🔍 to Done 💪🏾 in QHub Project Mangement 🚀 Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants