Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Important Issues #23

Closed
nishikantparmariam opened this issue Dec 7, 2022 · 2 comments
Closed

Important Issues #23

nishikantparmariam opened this issue Dec 7, 2022 · 2 comments
Assignees

Comments

@nishikantparmariam
Copy link

nishikantparmariam commented Dec 7, 2022

Hi, I have tried this extension and found this very useful. Though this has some issues -

Polling for shutdown kernel

If the extension is opened in the right pane and if the kernel whose info is currently being shown is shut, the extension still polls for that, and all requests give 404 kernel not found error -

poll-for-non-existent-kernels

No. of requests being sent on notebook tab change

The extension makes nearly exponential no. of API calls in some cases which can eventually crash the server or give too many file descriptors error. Steps to reproduce -

  • Open two notebooks and the extension in the right pane
  • Open the networks tab as well
  • Switch between notebook tabs and notice the no. of requests being sent each time and how fast they grow in number

This can also be confirmed by adding a console log statement around this line.

Requests go into the pending state when the kernel is busy

The extension makes API calls to get the kernel info. If there is a long-running cell say -

while True:
    x=1

all the requests go into the pending state. Likely it gets stuck at this line. After this, all other core jupyterlab requests go into pending state e.g. /sessions, /terminals etc.

UX (Minor)

Assuming the extension is opened in the right pane. When multiple notebooks are opened and they are tab-switched, the kernel id and notebook name shown in the UI are updated very quickly, but other memory metrics corresponding to this kernel take time to show up, during this period it shows metrics of the last active notebook, which can give a false impression. A solution here would be to show a loading status?

@krassowski
Copy link
Contributor

This issues were tackled in #24 which:

  • fixed "No. of requests being sent on notebook tab change"
  • fixed "Polling for shutdown kernel"
  • alleviated "Requests go into the pending state when the kernel is busy"
  • indirectly alleviated "UX (Minor)"

I released https://pypi.org/project/jupyterlab-kernel-usage/0.6.0/ as a final release from this repository. I am happy to tackle any follow up issues once this extension gets merged into jupyter-resource-usage as proposed in #22 (jupyter-server/jupyter-resource-usage#164).

@krassowski
Copy link
Contributor

Closing as completed. If there are any remaining issues, we can track them in the new repository: https://github.com/jupyter-server/jupyter-resource-usage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants