-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Python Language Server uses too much RAM / Memory #2594
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
I have the same issue with VS Code version 1.27.2 |
Cause to VS Code not responding... |
Same here and unlike #2553, I have jedi disabled. |
Same here. I use vscode as git editor and also as mergetool.
After each merge conflict fixed in vscode, the server seems to not release the used RAM. |
The python extension is using nearly all my memory on my desktop computer, too. Task Manager says memory is eaten up by |
I have same issue on Linux Mint 18.3 with VS Code Version: 1.27.2 and extension 2018.8.0. After some time it uses all the RAM and starts flooding swap. |
For those of you bumping up against this, a reminder that setting |
And if anyone has a repo that can reproduce the problem that they can share that would be greatly appreciated as debugging a potential cause is nearly impossible otherwise. |
I already did switch back to jedi for the time being. As for a share-able repo, I've mostly been working on dups, did switch between projects using the project manager extension though. |
[ @nojvek I edited your ✉️ ⬆️ to come off as more 😃 and less 😠 ] |
I have the same issue using python3 on a small/new codebase (can’t share) where colleagues on same codebase works fine. I also have the project manager plugin installed. |
Thank you @brettcannon , Apologies for the tone. |
I'm going to leave this open, but hopefully we will have the fixes Mikhail and the language server team have made in the next release of the extension (at worst the one following). @nojvek no problem, we all get cranky sometimes. 😄 And I'll also mention that #1119 covers your request for a command to gather system details we ask for. |
@brettcannon are the releases on a regular schedule or just "when it's ready"? |
Thanks, for me I have found that enabling jedi solves the issue, strangely enough. |
@tadly you mentioned that you were switching between stuff using another extension, so I had not dived into trying the repo yet. Plus we are hoping to do a new release soon that will hopefully fix this. |
Hey, @brettcannon. Thanks for your reply! I think you can reproduce this behavior with thefuck's source code (at least this is the source code I'm having memory leak problems with). I'm on Linux 4.15 x86_64 and Python 3.7.0. Please let me know if you need any additional info. Also, I'd love to test any alpha/beta/RC. |
@scorphus if you install a development build then you should be able to test the current beta version of the language server. |
@brettcannon Still happens on vscode insider, dev build of extension. |
I'm also have this issue with latest python (3.7), OSX (Mojave). Also, I have |
Same here |
I first encountered this problem on vscode insiders (since stable doesn't work on Fedora 29) |
@scorphus, @NdagiStanley, @xen, @hmnd Can you try setting |
@MikhailArkhipov That config setting apparently doesn't exist. |
@hmnd - it does, it is simply not currently public (i.e. not listed in package.json). There are some development settings that rarely matter to regular users. |
@MikhailArkhipov Looks like ram usage remains incredibly high but it doesn't grow as quickly as before... |
@MikhailArkhipov doesn't help. I'm tried to restart VS Code after added this flag, but now it started to consume all resources again: If I kill process I'm getting this error on
Upd. In status line also shown spinning arrows circle with text "Analyzing workspace, 14 items remaining..." |
@MikhailArkhipov, thanks for your message. I tried with Maybe worth to mention, I'm running with only 8G of RAM and I don't know if memory usage stops increasing at some point because the system runs out of memory if I don't quit VSCode. This is the output of "python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.pylintEnabled": false,
"python.linting.pylintCategorySeverity.convention": "Hint",
"python.linting.pylintCategorySeverity.warning": "Error",
"python.analysis.watchSearchPaths": false,
"python.linting.flake8Enabled": true, After re-downloading language server, I see the following in the output panel:
I hope this helps. I'm still looking forward to a chance (aka free time) to test the development build, as @brettcannon suggested. I'll do so ASAP. Thank you all for your time and support! 👍 |
Most probably roots to microsoft/python-language-server#193 |
Same on macOS 10.14 (18A391), VSCode 1.27.2 and vscode-python 2018.8.0. It used 22GB of RAM on my machine xD |
Looks like it's fixed for me @DonJayamanne |
I tried and its works. Thank you very much for this changes and for your amazing work. |
Thanks. Y’all so 😎. I’m just curious what the technical issue was that caused such a collosal memory conquest? |
@nojvek If I remember correctly it was from the language server constantly re-processing modules as they changed but not freeing the memory from the old analyses. |
Environment data
VS Code version: Version 1.27.0 (1.27.0)
Extension version (available under the Extensions sidebar): 2018.8.0
OS and version: Mac Snow Leopard
Python version (& distribution if applicable, e.g. Anaconda): Python2
Honestly there should just be a command that generates this
Actual behavior
Machine crawls to a halt. Using Python's language server using 30GB+ happens after a couple of hours of use.
Expected behavior
Sonic like universe. FAST!
Steps to reproduce:
The text was updated successfully, but these errors were encountered: