Skip to content
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

Python Language Server CPU usage 100% #421

Closed
sneridagh opened this issue Sep 13, 2018 · 15 comments
Closed

Python Language Server CPU usage 100% #421

sneridagh opened this issue Sep 13, 2018 · 15 comments

Comments

@sneridagh
Copy link

screen shot 2018-09-13 at 10 46 53

I have to manage a very large Python codebase, but this is ridiculous... It doesn't calm at any time.

@gatesn
Copy link
Contributor

gatesn commented Sep 13, 2018

Which version are you running? We had an issue recently where the language server went into a recursive loop.

@sneridagh
Copy link
Author

It's on VSCode: See microsoft/vscode-python#2297

@srosti
Copy link

srosti commented Oct 3, 2018

I saw the same thing until I pointed vscode to the correct python interpreter.
https://code.visualstudio.com/docs/python/environments

@gatesn
Copy link
Contributor

gatesn commented Feb 15, 2019

This should be fixed with an upgraded Jedi. Please re-open if not

@gatesn gatesn closed this as completed Feb 15, 2019
@ahmed-shariff
Copy link

Upgraded to jedi-0.13.3, and I am still getting 100% cpu usage and pyls frequently hangs to the point where I have to manually kill the pyls process to be able to edit anything. any suggestions to fix this?

I am using emacs and lsp-mode

@arkhan
Copy link

arkhan commented Apr 27, 2019

I have the same issue
Please help!!

@vlurgio
Copy link

vlurgio commented May 23, 2019

Same issue here and can't figure out what's happening

@c0deaddict
Copy link

c0deaddict commented Jul 24, 2019

I'm also having this issue, it seems to be triggered when I start a string or edit a comment. The only solution seems to be to kill the pyls process.

When I do a strace -p $(pgrep pyls) I see pyls stat and lstat-ing all the files in the workspace, continuously repeating.

edit: on latest version (0.27.0) and using Jedi 0.13.3

@noobymcnoob
Copy link

I had this issue with Emacs and the fix was to remove a bunch of folders from the workspace.

@srj-github
Copy link

srj-github commented May 26, 2020

I'm also using emacs with pyls and this issue is starting to bug me. Can you please be more specific as to which folders were removed to fix the issue?

@noobymcnoob
Copy link

noobymcnoob commented May 26, 2020 via email

@srj-github
Copy link

If you are referring to the folder in which my project files are, I only have a single file "main.py" in there. So I guess it's another issue on my end :(

@Mic92
Copy link
Contributor

Mic92 commented Jul 8, 2020

I suspect that the problem with emacs-lsp is different from original bug reported here. Maybe we should open a new ticket. However so far I have not figured out when it triggers.

@srj-github
Copy link

I have fixed my issue but, sadly, I don't remember exactly how. It was surely a missing package that solved it, but I don't know which. Might be the emacs package "company-jedi" or "jedi" from pip but I'm not sure right now.

@mgax
Copy link

mgax commented May 27, 2023

FWIW, I had the same problem, with a large virtualenv installed inside the project directory. Moving the virtualenv outside the project root solved the issue, the language server is very snappy now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests