question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remote Jupyter connection with long running command: Extension host terminated due to memory

See original GitHub issue

Environment data

  • VS Code version: 1.35.1
  • Extension version (available under the Extensions sidebar): 2019.5.18875
  • OS and version: macOS Mojave 10.14.5
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.8 (Anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: JupyterLab 0.35.6
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info microsoft/vscode-python#3977): True

Expected behaviour

When connecting to a remote Jupyter server, I expect the VS Code extension host not to terminate unexpectedly, even when I run long running commands remotely (> 50 minutes), for example training machine learning models using Tensorflow.

Actual behaviour

When connecting to a remote Jupyter server and executing long running (> 50 minutes) commands like model.fit(), after approx. 50 minutes I receive a popup ‘Extension host terminated unexpectedly’ with the option to restart the extension host. The connection to the Jupyter session is lost and I receive no further output from the long running command, even if I restart the extension host. I cannot reconnect to the kernel which seems to be still running (as I can see on the server). I also cannot interrupt or restart this kernel, as the corresponding buttons show no reaction. To continue working I have to kill the running kernel on the Jupyter server. When I have done this and try to start another Jupyter session from VS Code, I receive the message ‘Cannot execute code, session has been disposed.’

Steps to reproduce:

  1. Setup a python file with ipython cells.
  2. Configure an external Jupyter server (specify Jupyter server URI)
  3. Execute a command via IPython running longer than 50 minutes.

Logs

No output in the output panel

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Jun 20, 2019

Thanks that helps a lot.

0reactions
MariusMeinerscommented, Apr 26, 2021

We have this exact same issue - seems not to be solved as of today…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remote Jupyter connection with long running command ...
When connecting to a remote Jupyter server, I expect the VS Code extension host not to terminate unexpectedly, even when I run long...
Read more >
Receiving error message 'Extension host terminated ...
When I open developer tools, this is what I find in the console. Running vscode from command prompt with Code.exe --disable-extensions doesn't ...
Read more >
Data Science/Machine Learning Platform (DSMLP)
To support longer training runs, we permit background execution of student containers, up to 6 hours execution time, via the "-b" command line...
Read more >
Language Server Extension Guide - Visual Studio Code
This extension has access to all VS Code Namespace API. Language Server: A language analysis tool running in a separate process.
Read more >
Troubleshooting Vertex AI Workbench - Google Cloud
This page describes troubleshooting steps that you might find helpful if you run into problems when you use Vertex AI Workbench managed notebooks...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found