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
Out of memory crash pyright-langserver #7157
Comments
Could you post the language server logs? I'm not sure how to access these in neovim. In VS Code, you would go to the "Output" tab and choose "pyright". Adding An out-of-memory condition like this is typically because you're configuring pyright to find and type check every Python source file on your volume — perhaps by specifying a root directory of / or having a symbolic link somewhere in your project that redirects to /. The log output will typically provide clues about what's happening. |
Hi @erictraut, I think I found the cause of the problem. I guess it is caused by my workflow, because when I added the pyrightconfig.json file in the source folder, it solved the problem. The way my repository is organized is as follows:
The pypoetry.toml files are located in the research/venvs/some_venv folder and the sources are in research/projects/experiment_i. When I open neovim in one of the experiments folders, I guess pyenv cannot find pyrightconfig.json or pyproject.toml or ??? file by going up in the folder tree. Therefore it starts to 'index' all that is on the disk, like you suggest. When adding a pyrightconfig.json in the current source folder (e.g. research/projects/experiment1/pyrightconfig.json), pyright did not crash anymore. When moving the file to /home/ubuntu/pyrightconfig.json, pyright crashed again, giving the message below:
Followed by the heap out of memory error that I posted before:
Thank you for the hint to the solution. I'll close the issue as resolved. |
To make the comment above complete, the pyrightconfig.json that I mentioned has the following content: {
"verboseOutput": true
} |
I sorry to reopen issue #3239. I'm using pyright 1.1.348. The pyright language server crashes as seen in the LspLog output of neovim:
I tried with
node-v18.16.0-linux-x64
andnode-v20.11.0-linux-x64
.System:
Ubuntu 22.04 64bit
neovim 0.9.5
node 18.16.0 LTS || node 20.11.0 LTS
Is there a workaround or fix available? Or am I doing something wrong? Let me know if I can provide more information.
The text was updated successfully, but these errors were encountered: