-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Microsoft.Python.LanguageServer excessive resource usage #3724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Kai How much RAM does your Mac have? I've opened the fast.ai code and I find on my Mac the LS stabilizes at a little under 500MB RAM used. We're running the same version. I'm wondering what could be different. Was it memory consumption too or just CPU that was excessive? Is there anything unusual in your Python search path? |
Hey! What would you consider not normal? :-) The only thing I can think of is that the fastai package is installed with the |
I originally saw this bucketed with some other issues around excessive memory consumption but then realized you weren't complaining about that. We can repro your issue and are investigating. Thanks! |
Same issue here on Windows 10 |
This comment has been minimized.
This comment has been minimized.
@thedadams, it might be useful to attach a debugger to the Python process to see what it is and what it's doing. AFAIK unless you've started executing code in the debugger or Jupyter, when using the language server there shouldn't be any Python process. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reported it to main repository couple of days ago. Reposting here for ease of accessing the logs. Python Language Server consumes tons of memory #65639Issue Type: BugWhen I edit several python scripts (200-2000 lines each), over time the language server process starts to consume more and more RAM. It happens with both Microsoft.Python.LanguageServer and python jedi. This process is not limited and sometimes can eat up to my whole 16 GB + 8GB swap. If I kill the LS, its memory usages drops to almost none after the restart, but will eventually return to its previous state. VS Code version: Code 1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e, 2018-11-15T19:07:43.495Z) System Info
Extensions (12)
It actually led my system to invoke OOM Killer $ journalctl
|
any solutions for that one? |
Is there any chances that this is caused due to security softwares? (Like antivirus, enterprise Windows, etc) |
As an addition. This issue sounds as the same issue i have here. (Detailed at #4416 ) |
Not only on Windows, but Mac users also suffer from the Python Language Server. |
Maybe it is related: When I open up VSCode in one of my projects cpu usage goes to 80%+ while it continually shows "Discovering Tests" in the lower bar. Edit: Version: 1.33.1 (user setup) |
I have created a very simple Python project just to make some tests. And after some time, I can confirm that I only have memory leaks when pointing to a Virtual Environment. At the right moment I change the "python.pythonPath" to the system's python executable, the memory leak disappears. I have only tested on Windows. |
A lot of performance issues were fixed in the last 2 months with the Language Server. If you still have specific perf problems with the Language Server, please file an issue on the other repo. If you have perf issues that are not related to the language server, please file another issue on this repo. |
I can definitely confirm, that my original issue is fixed now. |
Environment data
Expected behaviour
Microsoft.Python.LanguageServer is using a reasonable amount of ressources.
Actual behaviour
Microsoft.Python.LanguageServer is using 100%+ CPU Power which is of course draining my battery very fast.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: