-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Microsoft.Python.LanguageServer.exe eating all RAM and lots of CPU. #2838
Comments
OK, the Jedi thing was User Error. I forgot to alter it in workspace settings too. So I have been able to disable the python language server, but it would be nice if I could use it. |
May be related to |
I also have it eating all the memory and then swapping (roughly 18GB) on linux. Apparently I can reproduce with a checkout of Django and browsing around. |
This should be fixed via microsoft/python-language-server#280 (reported microsoft/python-language-server#278). It's not in the stable release channel yet, but you can pull our latest language server daily build by setting |
@jakebailey Oh sorry; I assumed that parts of it shipped out to stable already. My mistake! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
At this point please do not leave a comment about having the same issue unless you have tried the following and you are still having issues:
At this point we need validation from someone that the believed fix available in the daily build actually fixed this specific problem, not confirmation that the stable version is still buggy. |
The stable build that the extension downloads has been updated to a more recent revision with a fix. At this point, you should be able to restart the editor and see 0.1.48 download and start up and no longer have this memory usage issue. |
Hi Jake, Brett. I have disabled jedi again, and I did get an update today, and I have confirmed that the language server is now 0.1.48, and, while it takes much longer, I'm afriaid the CPU is running 1 thread at max capacity i.e. ~16% CPU usage on a 4 core 8 thread machine, or 100% when cpu affinity set to a single core, and memory usage, very gradually, creeps up to ~100%. I will link to a youtube video in a moment. Put the kettle on, it doesn't get interesting ( ;-) ) until 7 minutes in. |
Turn your speakers off. I didn't realise the windows 10 screen recorder was capturing my microphone :) https://www.youtube.com/watch?v=0rIJxcpQl7Y&feature=youtu.be |
@carlfarrington Looking at your video, you seem to have your project code actually inside of your virtualenv directory, as opposed to storing it in its own subdirectory (for example, when I start a project in, say, If it's still happening, add Since your issue has more to do with the language server than the extension itself, I'd appreciate it if you opened an issue over at Microsoft/python-language-server with your info (including new stuff), instead of using this issue tracker. 🙂 |
Thanks Jake. I probably haven't done my virtual-env stuff properly, it was the first time I'd done it and the concept was new to me. It's a bit late here now and this is a bad week but if I still have trouble I will do as you've said over at the other issue tracker. Thanks for your help. |
I have updated to the latest stable release and opened a git clone of Django. The good news is that memory usage stays constant now. The bad news is that one CPU is at 100% since minutes. Is analysis still ongoing? This is what the trace said so far:
|
Minutes later still the same things, now with jumps in memory. Language Server uses around 6 GB. I've disabled language server again. It should be easy to reproduce with a checkout of https://github.com/django/django/ |
Well, i've done all the steps with some observations: Than VSCode downloaded the last version of the languageServer. After some time, it consumes all the memory. |
@fchevitarese the config is recognized, it just isn't defined by default as it's considered a hidden, private configuration we only tell people about when we ask for help in debugging. |
Well, i've done all steps, and still got the same problem. |
As @jakebailey said in his comment, at this point the best way to help is to open/reply to the appropriate issue over at https://github.com/microsoft/python-language-server with log level turned up to help diagnose where things are going wrong. |
I've followed debugging tips for getting the latest language server: Language Server Version: 0.1.62 I'm still seeing 1 CPU pegged at 100%, and RAM constantly climbing. After looking at AnalysisLog.txt in the language server directory of the extension, I'm seeing thousands of lines like this:
I thought this might have something to do with the root paths (because the final component of the import path above was missing in previous language server version logs - (after) ge.tests.ge -> ge.tests (before)). My project is
I should note this is a python2.7 project, and I'm guessing the weird imports are due to Since AnalysisLog was constantly being written to, I figured this might be the cause for my 100% cpu, but I didn't know whether it was the use of the language server from the extension, or the server itself. Happy to repost over on the language server repo. In fact, my cpu usage has just dropped down to a reasonable level (near 0 while I'm not actively using the editor) after the update to the latest server. It was pegged at 100% for over 10 minutes though. |
On my MacBook Pro 2017, this process uses more than 100% CPU constantly. Also, I use And yes - I removed directory Is it possible to deactivate this process (turn off IntelliSense and others "cool" features)? |
@mmospanenko Set |
I have opened a sibling issue on the language server at microsoft/python-language-server#431 . Please leave details there going forward (I'm going to lock this issue to help make sure details make it to the language server team and don't get lost over here). If people run into other CPU/memory issues, please open them over at https://github.com/Microsoft/python-language-server and then reference this issue by pasting in |
Closing in favour of microsoft/python-language-server#431. |
Hi.
The Microsoft.Python.LanguageServer.exe is eating up all my memory. It goes all the way to 12 gigs, then drops down to 1gb, then climbs again, constantly.
I had this problem a week or two ago and it was cured by installing an ms-python-insiders.vsix manually. I think it's updated itself and broken again.
I have tried python insiders extension, as well as the 2018.9 that is available from the side bar. I've also tried both with VSCode stable, as well as VSCode insiders.
Also "python.analysis.watchSearchPaths" : "false" has made no difference
My PC is going very slow and it's swapping all over my SSD.
Any ideas?
Environment data
Actual behavior
Computer runs slowly.
Expected behavior
Computer works at a reasonable speed and doesn't get hot and slow and waste away my SSD.
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: