You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API activity no longer updates api_last_activity on the server.
I believe this was caused by the changes to user handling in the base APIHandler. Previously, _user_cache was used to store the current user. Now all of that was moved into JupyterHandler, and the only remaining reference to _user_cache is in update_api_activity
At my company we rely on last_activity to determine if a jupyter server is actively in use. Since API activity is not being accounted for anymore, our automated systems are mistakenly stopping servers that are being used without the web-UI.
Expected behavior
API calls should update api_last_activity, which gets accounted for by last_activity in /api/status
Context
Operating System and version: ubuntu 22.04
Browser and version: chrome
Jupyter Server version: v2.7.0 (anything 2+ should do it)
Please note that updating to Notebook 7 might break some of your extensions.
[I 2023-06-29 18:21:02.167 ServerApp] nbclassic | extension was successfully loaded.
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[D 2023-06-29 18:21:02.290 ServerApp] Using default logger
[I 2023-06-29 18:21:02.291 ServerApp] nbdime | extension was successfully loaded.
[I 2023-06-29 18:21:02.294 ServerApp] voila.server_extension | extension was successfully loaded.
[I 2023-06-29 18:21:02.295 ServerApp] The port 8888 is already in use, trying another port.
[I 2023-06-29 18:21:02.295 ServerApp] Serving notebooks from local directory: /home/jovyan/workspace
[I 2023-06-29 18:21:02.295 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-06-29 18:21:02.295 ServerApp] http://localhost:8889/lab?token=aa9f6356a4e9561da4cb84b72f2bb82046a3ab18af1b681b
[I 2023-06-29 18:21:02.295 ServerApp] http://127.0.0.1:8889/lab?token=aa9f6356a4e9561da4cb84b72f2bb82046a3ab18af1b681b
[I 2023-06-29 18:21:02.295 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2023-06-29 18:21:02.299 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2023-06-29 18:21:02.300 ServerApp]
To access the server, open this file in a browser:
file:///home/jovyan/.local/share/jupyter/runtime/jpserver-4976-open.html
Or copy and paste one of these URLs:
http://localhost:8889/lab?token=aa9f6356a4e9561da4cb84b72f2bb82046a3ab18af1b681b
http://127.0.0.1:8889/lab?token=aa9f6356a4e9561da4cb84b72f2bb82046a3ab18af1b681b
The text was updated successfully, but these errors were encountered:
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Description
API activity no longer updates
api_last_activity
on the server.I believe this was caused by the changes to user handling in the base APIHandler. Previously,
_user_cache
was used to store the current user. Now all of that was moved into JupyterHandler, and the only remaining reference to_user_cache
is inupdate_api_activity
jupyter_server/jupyter_server/base/handlers.py
Lines 769 to 777 in 8c90eb5
As a result, api_last_activity is never updated.
Reproduce
At my company we rely on last_activity to determine if a jupyter server is actively in use. Since API activity is not being accounted for anymore, our automated systems are mistakenly stopping servers that are being used without the web-UI.
Expected behavior
API calls should update api_last_activity, which gets accounted for by last_activity in
/api/status
Context
Troubleshoot Output
Command Line Output
The text was updated successfully, but these errors were encountered: