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

Out of control CPU while using #800

Open
tekHudson opened this issue Mar 28, 2024 · 22 comments
Open

Out of control CPU while using #800

tekHudson opened this issue Mar 28, 2024 · 22 comments

Comments

@tekHudson
Copy link

Problem/Motivation

I heard the fan on my machine going nuts.

top showed 95+% CPU consuption with no process showing any consumption.
Screen Shot 2024-03-28 at 7 46 36 AM

The htop didn't help much either.
Screenshot 2024-03-28 at 1 16 14 PM

Awhile had passed and the CPU seemed to have started to wind down (i was working so could only deal with this on and off).
I had a break so I went to VScode to check my logs and immediatly heard the Fan go nuts.

I looked at the VScode addon page
31f973e5c1b8805394d6280f001af462a006f4b4

Expected behavior

Runs smoothly?

Actual behavior

see above

Steps to reproduce

not sure

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

@BradenJ6164
Copy link

I am also having this issue.

@PiotrMachowski
Copy link

PiotrMachowski commented Apr 14, 2024

I have also experienced this issue. In my case it seems to be caused by opening / directory instead of /config. Maybe it intensively indexes the whole root directory?

@banan77
Copy link

banan77 commented May 10, 2024

Same here (RPI 4b 8gb)
The addon was working fine until one of updates, since then I had to disable the addon as it consumes all CPU immediately. It's a pity as it was fantastic tool, sad to see nobody cares

@Egglestron
Copy link

Same issue found thanks to the Glances add-on: 10 GB of RAM and 80% CPU usage. Happened while going in and out of Visual Studio Code, maybe a new instance is launched every time.

Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jun 11, 2024
@Rindula
Copy link

Rindula commented Jun 13, 2024

This issue happens on my side too, by restarting the addon, the issue is solved. Also, Ram Usage seems also to be affected.

As soon as I open the VS Code Tab the usage spikes as seen below and falls down when closing the tab, but still rises without code being opened (instance running in background). I'm running on a Raspberry Pi 4.

image

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jun 14, 2024
@Destroyer061090
Copy link

same problem here... i was thinking problem was relate to HA core but now im sure its VS code. Im running everhing in docker container.

home-assistant/core#119796

@mhoogenbosch
Copy link

I have issues with CPU too, but a little bit different. When watching the release party I saw a jump page with links to all Addons. I love the approach so I decided to create this too.

I have a entities card with :

type: entities
entities:
  - type: weblink
    name: Studio Code Server
    url: /hassio/ingress/a0d7b954_vscode
    icon: mdi:microsoft-visual-studio-code

This makes the page just start. But it seems it is not closing it. It just opens more sessions.

Is this the same issue, or the same cause, or should I open a new one?

@marciogranzotto
Copy link

@frenck can you release a new version of this add-on? Looks like this may be related with a bug on add-ons that use devcontainers. This was fixed back in April: microsoft/vscode-remote-release#9586

@bkbartk
Copy link

bkbartk commented Jul 12, 2024

I experience the same issue,
but only if I open the folder /
If I open the default folder /config memory usage seems to be more stable

@theyo-tester
Copy link

I experience the same issue, but only if I open the folder / If I open the default folder /config memory usage seems to be more stable

Yes I can confirm this too!
I think it has to do with the amount of files vs code (or the Home Assistant Config Helper extension) has to watch for or scan. So make sure you just use the correct folder in your workspace: Three lines => File => Open Folder... or just press CTRL + O and make sure you are working in the "/homeassistant/" folder
image
And if it is absolutely necessary change it to "/" only temporary, and don't forget to go back to the right folder afterwards :)

I've also noticed that the autocompletion feature served by the Home Assistant Config Helper extension does not work (an issue that multiple persons have complained about), if you are not in the right folder.

I spent hours banging my head around why the autocompletion did not work and why it used so much CPU 🤦‍♂️

Just my 2 cents :D

BR

@Rindula
Copy link

Rindula commented Aug 2, 2024

@frenck Could this be noted somewhere in the docs as some sort of warning to not use/open the root folder?

@tjorim
Copy link
Contributor

tjorim commented Aug 2, 2024

@frenck Could this be noted somewhere in the docs as some sort of warning to not use/open the root folder?

Feel free to open a PR.

@amagnolo
Copy link

Selecting /homeassistant/ as working folder doesn't solve the issue of high CPU usage in my case.
Not so long ago this add-on used to work all right with "/" as working folder (that's what I need). CPU usage was nearly 0% when not actively using VScode; right now I have to explicitly stop the add-on when I finish using it, otherwise it melts my rpi4.

@amagnolo
Copy link

As a workaround, I found the the "file editor" add-on lets you work in "/" files if you disable the default option "Enforce Basepath".
That add-on consumes 0% CPU when unused.

Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Sep 18, 2024
@banan77
Copy link

banan77 commented Sep 18, 2024

Still not solved, the addon is unusable, at least on RPI

@mhoogenbosch
Copy link

I'm using the 'workaround' too because I haven't seen a new release, or anything related to solving this issue. I'd rather use vscode, but very much not usable. I need to restart the addon every time I've used it.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 19, 2024
@antoweb
Copy link

antoweb commented Oct 7, 2024

After last update same problem. My Rasberry goes 32 load average and rebooted itself

@eikowagenknecht
Copy link

Same here, on both a Raspi 4 and a Raspi 5 this addon creates a lot of CPU load, even when not actively used.

I have always only used the /config folder, so it should not be the / problem.

This is a typical load on my Raspi 5 after using it once and then leaving it alone for days.
Using it multiple times makes the problem worse (maybe multiple instances?).

Maybe related (or not), autocomplete and linter sometimes take a few minutes.

image

My "workaround" is to manually stop the addon after using it and then restart it as needed.

@metbril
Copy link

metbril commented Oct 30, 2024

Upgrade from 5.17.1 to 5.17.2 made my cpu usage for the add on spike from 2% to 30%. I've downgraded.

@emufan
Copy link

emufan commented Nov 18, 2024

I've downgraded.

How did you do it?

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