Lots of jedi subprocesses created until memory runs out
See original GitHub issueIt seems to be a regression of https://github.com/microsoft/vscode-python/issues/3586 and https://github.com/microsoft/vscode-python/issues/3514 . This started to happen recently (I can’t tell exactly when, but a couple of weeks back I didn’t experience this issue).
Environment data
- VS Code version: 1.37.1
- Extension version (available under the Extensions sidebar): 2019.8.30787
- OS and version: MacOS High Sierra Version 10.13.6
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.3
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
- Relevant/affected Python packages and their versions: XXX
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): Jedi
Actual behaviour
After working for a while in a Django project, python completion.py spawns lots of subprocesses that are never killed. Eventually the system runs out of memory and fork fails. You can close the visual studio folder in order to free memory, but it takes a while for the python processes to be killed and the computer gets unresponsive.
Steps to reproduce:
- Open a python project
- Browse some files, and on each of them call autocomplete and save several times. After a while you should get a lot processes that won’t go away.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
Python memory allocation error using subprocess.Popen
The solution is to use posix_spawn, or create all your subprocesses at the beginning of the script, while memory consumption is low, ...
Read more >What are Python Subprocesses & Why Do They Matter?
A subprocess is a task that is created by a process to complete a task ... would quickly run out of memory for...
Read more >An Introduction to Subprocess in Python With Examples
Subprocess in Python is used to run new codes by creating new processes. Learn how to use the Python subprocess module along with...
Read more >(PDF) Memory handling in the ATLAS submission system from job ...
1. Introduction. The ATLAS [1] workload management system is a pilot system that wasn't originally designed · 2. Changes affecting ATLAS jobs memory...
Read more >subprocess — Subprocess management — Python 3.11.1 ...
When used, the internal Popen object is automatically created with stdout=PIPE and stderr=PIPE . The stdout and stderr arguments may not be supplied...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi. There is also similar problem for pylint: https://github.com/microsoft/vscode-python/issues/4236 I found recently that processes do not die automatically when spawned for files with errors. Maybe there is something common in these issues?
@deitry Thanks, however that’s a separate issue even though they may seem related. We’ll monitor/track that issue separately. If indeed they end up being related (generic issue), then we’ll end up fixing this as well.