Open
Description
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: macOS, ChromeOS
- Remote OS: Ubuntu 20.04, 22.04
- Remote Architecture: x86-64
code-server --version
: 4.2.0, 4.3.0
Hi,
The memory consumed by the code-server (node) process gradually increases over time, regardless of whether and how the IDE is used. I have tested it multiple times and it has eventually used up all the 8GiB RAM of the server machine in a matter of 2 or so weeks.
Is this a well-known problem? Can I solve it permanently instead of rebooting the sever each time?
Many thanks
Steps to Reproduce
- Install code-server and run its daemon
- Continually measure memory usage of the process
- Wait :)
Expected
The memory usage should not be monotonically increasing
Actual
It is
Logs
No response
Screenshot/Video
No response
Does this issue happen in VS Code?
- I cannot reproduce this in VS Code.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
No response
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
benz0li commentedon May 13, 2022
I can confirm that the memory consumed by the code-server (node) process gradually increases over time.
jsjoeio commentedon May 13, 2022
Does this also happen with native VS Code?
Side note: this would be a fun problem to solve. I'm not sure how, but I'm sure there are tools we could use to figure it out.
aghasemi commentedon May 14, 2022
No. I have VSCode continually open on a MacBook for weeks and never had a memory issue. Same for a ChromeOS device.
LaCocoRoco commentedon May 23, 2022
I have the same / similiar problem on debian 11 with code server 4.4.0. Couldn't find the reason yet. When the memory is full, all sessions start to slow down, freeze and finally crash (Probably the memory leaking component / extension shuts down). Is there a way to pinpoint down this issue (Enable debug log as example)? I also thought to temporarily increase the Cloud Memory from 4GB to 8GB.
aghasemi commentedon May 23, 2022
My "solution" was adding a line to crontab to restart code-server every 24 hours 😆
benz0li commentedon May 24, 2022
https://www.npmjs.com/package/heapdump?
LaCocoRoco commentedon May 25, 2022
Today the system used 3.4GB of 4GB. I killed the extension volar and it droped by 3GB. Once i also read about memory problems with the extension settings sync. Is there a way to limit the ram usage of installed extensions?
15 remaining items