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

High memory consumption #905

Open
MikeBP13 opened this issue Nov 26, 2024 · 12 comments
Open

High memory consumption #905

MikeBP13 opened this issue Nov 26, 2024 · 12 comments

Comments

@MikeBP13
Copy link

Problem/Motivation

Every time I open the add-on, the memory consumption increases significantly (>3% on a 16GB installation) even without doing anything with it...

Expected behavior

Keep memory consumption low if add-on doesn't perform any actions - similar to the behavior experienced several months ago (at least 2-3 releases ago)

Actual behavior

See reason

Steps to reproduce

  1. Restart the add-on -> memory consumption is low
  2. Open the add-on -> huge jump in memory consumption without doing anything (no files are open, ...)

Proposed changes

No idea...

@davidrapan
Copy link

davidrapan commented Dec 2, 2024

Yeah and at least as far I know it started happening w/ some of the recent updates... but I noticed that it is already mentioned in several other issues. 😉

@sp0ngeboobs
Copy link

also the same problem. It took 4GB of RAM. Rebooting HA does not work, you need to reboot the entire addon to clear the memory. Every day takes away a little bit of memory

@MikeBP13
Copy link
Author

MikeBP13 commented Dec 3, 2024

also the same problem. It took 4GB of RAM. Rebooting HA does not work, you need to reboot the entire addon to clear the memory. Every day takes away a little bit of memory

I can confirm: HA restart does not help. You need to restart the add-on or reboot the machine hosting HA to clear the memory. Even after restart, the consumed memory slowly increases each day even though the add-on is not used.

@LogicAnalysis
Copy link

LogicAnalysis commented Dec 10, 2024

I also had the same issue. As @sp0ngeboobs said, restarting HA doesn't solve the issue. Restarting the addon does provide a temporary remedy. In my case, it was using >10gb of RAM! I only noticed when Frigate failed to start due to signal 9, and I had to investigate. Turns out VS was hogging all the RAM

@sca075
Copy link

sca075 commented Dec 17, 2024

Had noticed the same, and I guess there was a similar issue in the past. I would say CPU and Memory rump up and I can confirm that restarting the addon is the only option as per I guess HA is restarting only itself. I just roll back the addon to the the earlier release as the last was publish in November there was still a backup available. If this somehow solve the problem will let you know.

@sca075
Copy link

sca075 commented Dec 19, 2024

5.17.3 is currently reinstalled and CPU is stable at 1.5% 0.95%.. memory is fix at 0

@matthewcbyington
Copy link

I'm on 5.18.0 and still seeing high memory consumption.

@conducton
Copy link

conducton commented Jan 19, 2025

To solve temporary the issue I added an automation to restart the add-on when it reached 8 clients.
Not the best solution but it's working.

Here is the code :
alias: Restart_VSCODE
description: ''
triggers:

  • trigger: numeric_state
    entity_id:
    • sensor.connected_clients
      above: 8
      conditions: []
      actions:
  • action: hassio.addon_restart
    data:
    addon: a0d7b954_vscode
    mode: single

to add the sensor.connected_clients i followed https://www.home-assistant.io/integrations/websocket_api/

@glemag
Copy link

glemag commented Jan 28, 2025

Confirming the same, version 5.18.1., memory usage from 4Gb about 15%

@MikeBP13
Copy link
Author

It's getting worse: editing 4 files from config directory, the addon used memory reached 25% of 16GB...

@glemag
Copy link

glemag commented Jan 28, 2025

Also confirming that it's happened since last versions...

@kwkid
Copy link

kwkid commented Feb 2, 2025

Glad I found this thread. The same is happening to me but only when I am using a Chrome browser. Switching to Microsoft Edge I do not experience the high memory usage or constant freezing of vs code. Perhaps someone can confirm this.

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

9 participants