SciRuby / iruby

Official gem repository: Ruby kernel for Jupyter/IPython Notebook
https://github.com/SciRuby/iruby
MIT License
890 stars 27 forks source link

Shutdown takes 5 seconds per kernel #311

Closed ankane closed 1 year ago

ankane commented 2 years ago

Hi, it looks the kernel shutdown is timing out every time.

Shutdown this notebook server (y/[n])? y
[C 11:06:28.858 NotebookApp] Shutdown confirmed
[I 11:06:28.860 NotebookApp] Shutting down 3 kernels
[I 11:06:28.861 NotebookApp] Kernel shutdown: ac819a12-7ff7-4d8d-b414-91c888076d63
[I 11:06:33.972 NotebookApp] Kernel shutdown: 810fb64e-b04c-487f-b28c-abfb2490e588
[I 11:06:39.082 NotebookApp] Kernel shutdown: 61112573-bc7a-463f-8ee2-d4e66d6b4106
[I 11:06:44.195 NotebookApp] Shutting down 0 terminals

From what I can tell, it's due to this line blocking indefinitely.

kojix2 commented 2 years ago

Thank you for your report. That's true. It seems that Ruby notebooks take longer to shut down than Python notebooks.

mrkn commented 2 years ago

I guess we need to introduce the control channel and support shutdown_request message to fix this issue.

I'm working on introducing the control channel due to debugger support. I'll extract the control channel part and add shutdown_request support in the new branch asap. Stay tuned.

ankane commented 1 year ago

Cleaning up issues