Shutting down a remote kernel from Spyder

Question:

I am using a remote kernel on a cluster, which I connect to using Spyder. For this, I start my kernel on the cluster with python -m spyder_kernels.console &. Then I copy transfer the *.json file that is created in the runtime directory of jupyter to my local computer, then connect through Spyder using the .json file to the kernel on my cluster. This works very well.

When wanting to shut it down again, I issue exit in the console in spyder, which appears to shut down the kernel (at least in my local Spyder window). However, when I check for processes running on the cluster, multiple processes keep on running on the cluster. So far, I issued SIGTERM to them through htop to stop them.

How do I cleanly shut down the remote kernel so that no processes keep running?

Asked By: sfluck

||

Answers:

(Spyder maintainer here) Unfortunately, it’s not possible to shutdown nor interrupt remote kernels at the moment (February 2023).

That has to do with some tricky issues with the Jupyter architecture (we use the same architecture as Jupyter to run code) that we’ve been unable to sort out, sorry.

Answered By: Carlos Cordoba
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.