-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
What is the best way to ensure the shutdown of a kernel before initializing a new one? #338
Comments
…ured server (#338) (#341) Co-authored-by: Marcos Alves <[email protected]>
Hey @echarles, after some additional testing on my side, I believe we can close this issue.
Finally, I have one last question/confirmation regarding the |
Sure @MarcosVn I am closing this issue and let you open a new one regarding the request to sessoins/kernels. |
Thx, @echarles |
Description
I am experiencing an intermittent issue in my custom
Notebook.tsx
, which usesCell.tsx
from the library.The problem is: intermittently, the shutdown of the current kernel doesn’t always seem to complete before the new kernel is created. This happens, for instance, when the user quickly exits the component and enters another notebook. Because of this, we got a
disconnected
kernel during the creation.I had taken inspiration from the
useKernel
hook inNotebookInit.tsx
fromjupyter-react
examples to handle the creation and shutdown process, and even with an additional lock, it still occasionally seems insufficient.The current behavior below (using the isShuttingDown lock) seems to minimize the issue well, but is there a better-known way to handle this?
Additionally, I noticed that in version
0.17.x
, some requests to the Jupyter server are being directed to oss.datalayer.run (even though my server configuration is set), and requests are subsequently made to it. I ran some tests, and this seems to be related to the default values set inJupyter.tsx
. When I removed them, the issue was resolved. Should I open a new issue for this?Reproduce
Expected behavior
The kernel must be reliably shut down before initializing a new one.
Evidences
Dead/disconnected kernel:
Requests starting from
oss.datalayer..
and after changing to my jupyter-server0.17.1
Ubuntu 22.04
Chrome 130.0.6723.116
Browser Output
The text was updated successfully, but these errors were encountered: