coder / code-server

VS Code in the browser
https://coder.com
MIT License
66.53k stars 5.45k forks source link

[Bug]: Around 10G of RAM used after opening a folder with multiple rust crate project #6445

Open GopherJ opened 9 months ago

GopherJ commented 9 months ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Setup code server on a Linux mint server, use frp and cloudflare dns to reverse proxy request to this server
  2. Login to code server
  3. Open a folder with many rust crates
  4. RAM increased 10G while normally a rust-analyzer lap server doesn’t consume that much

Expected

No memory leak, lsp server can be shutdown correctly after moving focus to other projects

Actual

Memory Leak

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

Are you accessing code-server over HTTPS?

Notes

No response

GopherJ commented 9 months ago

Also although it’s a folder with multiple rust projects, but I opened only one of them and if I open that one using viscose it doesn’t consume 10G while code-server does comsume 10GB

skight-shen commented 3 weeks ago

Also although it’s a folder with multiple rust projects, but I opened only one of them and if I open that one using viscose it doesn’t consume 10G while code-server does comsume 10GB

Same issue. Any updates?

code-asher commented 3 weeks ago

code-server is just a wrapper around the tech Codespaces uses so it does seem surprising that the issue does not reproduce there. We have a few patches, of course, but nothing that looks to me like it could cause this, although I could be wrong.

Is it the extension host that is consuming the 10 GB? Or which process?

I see a few issues about memory usage on the language server/extension repository; a few of them have some troubleshooting steps we might want to try out: https://github.com/search?q=repo%3Arust-lang%2Frust-analyzer+memory+usage&type=issues