How to stop Jupyter Kernels from dying when sleeping/disconnecting laptop?
Hi, This has become a fairly annoying problem - sometimes I just need to move my laptop, and if I have to sleep it, my Jupyter kernel will just stop and I'll have to rerun (expensive data processing code). Sure I can remember to pickle the data, but it seems like there should be a way to have the disconnection not kill the process and allow a restart.
We're using Coder on a remote machine, that I have limited access to, so any solution needs to be explainable in a way I can ask my admin to set up.
Thanks in advance,
Winton
8 Replies
<#1282707815307284584>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey @Atif if you could help on this one as I am not familiar with Jupyter
Disconnecting from your workspace only kills the processes running in your PTY sessions
I've not used jupyter, but from what I can tell
jupyter notebook
starts a server that lives in a terminal session, perhaps you want it to run in the background? Appending an &
to a command runs it in the background for most shells: jupyter notebook & disown
If you're already doing that, and Coder is still randomly killing that process, I'd be a little concernedIt could be an upstream issue. Please see https://github.com/microsoft/vscode-jupyter/issues/3998
GitHub
Persistent Jupyter Kernels - Restore/Re-connect to an existing loca...
Problem Local User starts a notebook, the kernel is now running on the local machine Assume the computer goes to sleep, After a while if we go back into the notebook, the Notebook is unable to re-c...
So the process I'm connected to is initiated like this: /home/davies-w/.pyenv/versions/dsmljar/bin/python -m ipykernel_launcher --f=/home/davies-w/.local/share/jupyter/runtime/kernel-v3762931da59fa90f464a376fad45dc9af62895dc4.json
I'm somewhat guessing that random string of hex is created new everytime you launch a notebook?
ok, I'm able to start and disown, but how do I know what the URL should be to connect to?
@Atif do you have any ideas?
@Phorcys its likely an upstream issue with vscode on how it handles remote jupyter kernels Please the linked issue above.
oh yeah sorry didn't see that