question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Memory leak?

See original GitHub issue

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

  1. Install code-server and run its daemon
  2. Continually measure memory usage of the process
  3. 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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
aghasemicommented, May 23, 2022

I also thought to temporarily increase the Cloud Memory from 4GB to 8GB.

My “solution” was adding a line to crontab to restart code-server every 24 hours 😆

1reaction
LaCocoRococommented, Jun 6, 2022

Have you tried messing with the extensions? That also produced a solution for me 😃)

I’d rather wait for an official fix. But which extension? 😄

Volar Extension used about 700MB per instance in my case. It also felt like it did still run in the background after closing an workspace.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >
Three kinds of memory leaks - Made of Bugs - Nelson Elhage
Type (1): Unreachable allocations ︎. This is the classic C/C++ memory leak. Someone allocated memory with new or malloc , and never called ......
Read more >
Incident report on memory leak caused by Cloudflare parser bug
It turned out that the underlying bug that caused the memory leak had been present in our Ragel-based parser for many years but...
Read more >
Cisco Bug: CSCvd45973 - memory leak in platform_mgr process
Symptom: A CAT3650 / CAT3850 switch may experience a kernel level memory leak in the "platform_mgr" process. Leading up to this, there may...
Read more >
This Windows 11 Bug is Exactly Why I'm Waiting to Upgrade
A memory leak is when a program takes up memory and doesn't release it once you close the window. Essentially, it eats up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found