Closed iagomez closed 5 years ago
You're not doing anything wrong, but I'm afraid there is no good way of doing this IMO unless one integrates real process management into the extension (e.g. via cgroups, systemd, or some such). Ultimately I think the functionality of this extension will be obviated by having the JupyterHub spawner launch the rsession directly rather than through the Jupyter notebook. Since that already keeps track of the state of running servers it wouldn't be necessary to have something else keep track.
I think that will all be practical when the support for multiple servers per user lands which is either very soon or already done. :)
We should be able to do this by registering for a python handler for 'atexit' (https://docs.python.org/3/library/atexit.html) and killing the subprocess when we receive this.
This is accomplished now with https://github.com/jupyterhub/nbserverproxy/pull/64
Hello,
Is there a way to cleanup rsessions when the single-user servers stop running?
It seems like unless I explicitly quit the R session through R Studio, they are left untouched which could result in a large number of orphan sessions.
Let me know if I'm just doing something wrong.
Thanks!