dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] Using 66% of a CPU when idle

Open ohmantics opened this issue 2 years ago β€’ 28 comments

Environment

Self-Hosted (Docker)

System

Ubuntu 22.0.4

Version

2.1.1

Describe the problem

With no browser windows taking to dashy, the "node server" process is using 66% of a CPU core at minimum. Presumably this is background processing such as the docker healthcheck. There's no rebuild running. It's not going to zero at any point. With any browser window open, it goes up to 125% and stays there or above. However, this all seems very excessive for what's logically happening.

This was a straight-forward docker install using Portainer on a Raspberry Pi 4 running Ubuntu 22.04. This is enough CPU use to trigger the cooling fan on this box, hence why I've noticed it.

Additional info

partial output of pstree -a -p:

  β”œβ”€containerd-shim,654085 -namespace moby -id fcfa6e2acda69da0fbd4ca458e75243f3b7b4563f64322e231e6566505c71980 -address /run/containerd/containerd.sock
  β”‚   β”œβ”€tini,654108 -- yarn build-and-start
  β”‚   β”‚   └─node,654156 /opt/yarn-v1.22.15/bin/yarn.js build-and-start
  β”‚   β”‚       β”œβ”€node,654179 /app/node_modules/.bin/npm-run-all --parallel build-watch start
  β”‚   β”‚       β”‚   β”œβ”€node,654190 /opt/yarn-v1.22.15/bin/yarn.js run build-watch
  β”‚   β”‚       β”‚   β”‚   β”œβ”€node,654212 /app/node_modules/.bin/vue-cli-service build --watch --mode production
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654214
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654215
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654216
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654217
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654218
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654224
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654232
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654233
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654234
  β”‚   β”‚       β”‚   β”‚   β”‚   └─{node},654235
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654192
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654193
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654194
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654195
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654196
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654202
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654204
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654205
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654206
  β”‚   β”‚       β”‚   β”‚   └─{node},654207
  β”‚   β”‚       β”‚   β”œβ”€node,654191 /opt/yarn-v1.22.15/bin/yarn.js run start
  β”‚   β”‚       β”‚   β”‚   β”œβ”€node,654213 server
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654219
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654220
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654221
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654222
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654223
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654225
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654226
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654227
  β”‚   β”‚       β”‚   β”‚   β”‚   β”œβ”€{node},654228
  β”‚   β”‚       β”‚   β”‚   β”‚   └─{node},654229
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654197
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654198
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654199
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654200
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654201
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654203
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654208
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654209
  β”‚   β”‚       β”‚   β”‚   β”œβ”€{node},654210
  β”‚   β”‚       β”‚   β”‚   └─{node},654211
  β”‚   β”‚       β”‚   β”œβ”€{node},654180
  β”‚   β”‚       β”‚   β”œβ”€{node},654181
  β”‚   β”‚       β”‚   β”œβ”€{node},654182
  β”‚   β”‚       β”‚   β”œβ”€{node},654183
  β”‚   β”‚       β”‚   β”œβ”€{node},654184
  β”‚   β”‚       β”‚   β”œβ”€{node},654185
  β”‚   β”‚       β”‚   β”œβ”€{node},654186
  β”‚   β”‚       β”‚   β”œβ”€{node},654187
  β”‚   β”‚       β”‚   β”œβ”€{node},654188
  β”‚   β”‚       β”‚   └─{node},654189
  β”‚   β”‚       β”œβ”€{node},654167
  β”‚   β”‚       β”œβ”€{node},654168
  β”‚   β”‚       β”œβ”€{node},654169
  β”‚   β”‚       β”œβ”€{node},654170
  β”‚   β”‚       β”œβ”€{node},654171
  β”‚   β”‚       β”œβ”€{node},654172
  β”‚   β”‚       β”œβ”€{node},654175
  β”‚   β”‚       β”œβ”€{node},654176
  β”‚   β”‚       β”œβ”€{node},654177
  β”‚   β”‚       └─{node},654178
  β”‚   β”œβ”€{containerd-shim},654086
  β”‚   β”œβ”€{containerd-shim},654087
  β”‚   β”œβ”€{containerd-shim},654088
  β”‚   β”œβ”€{containerd-shim},654089
  β”‚   β”œβ”€{containerd-shim},654090
  β”‚   β”œβ”€{containerd-shim},654091
  β”‚   β”œβ”€{containerd-shim},654092
  β”‚   β”œβ”€{containerd-shim},654093
  β”‚   β”œβ”€{containerd-shim},654094
  β”‚   β”œβ”€{containerd-shim},654375
  β”‚   └─{containerd-shim},657704

Please tick the boxes

ohmantics avatar Nov 01 '22 18:11 ohmantics

If you're enjoying Dashy, consider dropping us a ⭐
πŸ€– I'm a bot, and this message was automated

liss-bot avatar Nov 01 '22 18:11 liss-bot

Same problem here... I'm about to look for an alternative because my raspberry freezes and I have to restart it.

bdovaz avatar Nov 07 '22 22:11 bdovaz

I had the same problem, so I built a new docker image from master, and that sort of seems to have fixed it. However, I also noticed that when I had the status check enabled, it would interfere with my pi-alert container (Note that pi-alert is VERY buggy). And both would consume a lot of cpu.

JohnnieDK avatar Nov 20 '22 09:11 JohnnieDK

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Dec 22 '22 01:12 liss-bot

AFAIK, nothing has changed. Sounds like Lissy93 is swamped.

ohmantics avatar Dec 22 '22 01:12 ohmantics

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Jan 22 '23 01:01 liss-bot

It is still relevant, no stale

bdovaz avatar Jan 22 '23 07:01 bdovaz

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Feb 23 '23 01:02 liss-bot

Still relevant. @Lissy93, any chance you'll be able to look at this? If not, perhaps you have some hints as to how you'd diagnose it?

ohmantics avatar Feb 23 '23 02:02 ohmantics

Hey, Really sorry for the delay in replying, (I have so many unread GH notifications at the moment, that it's hard to spot the important ones! 😬)

This definitely doesn't sound good at all, weirdly I'm running a very similar setup (Pi 4, default Docker, etc) and no issues. Looking at those logs, I'm wondering if it's something gone wrong with the healthcheck. If you disable that, do you still see issues?

Lissy93 avatar Feb 26 '23 20:02 Lissy93

@ohmantics, do you have an example config file to reproduce this issue? Also, does it still happen if you change the container command to run yarn start instead?

@Lissy93, is there any reason for the ARM-based Docker images to have yarn build-and-start as default CMD, while the Docker image for x86 is just yarn start?

adamantike avatar Feb 27 '23 23:02 adamantike

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Apr 06 '23 01:04 liss-bot

No stale

bdovaz avatar Apr 06 '23 07:04 bdovaz

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar May 07 '23 01:05 liss-bot

It is still relevant, no stale

bdovaz avatar May 07 '23 08:05 bdovaz

Same issue with docker compose, Dashy v2.1.1 on Debian 11 in a raspberry pi4. I was searching what was using 100% of CPU constantly until I stopped the stack. It does't go down when Dashy isn't accessed.

anderconsu avatar May 08 '23 21:05 anderconsu

Same issue with docker compose, Dashy v2.1.1 on Debian 11 in a raspberry pi4. I was searching what was using 100% of CPU constantly until I stopped the stack. It does't go down when Dashy isn't accessed.

Turning off Enable status check in page settings and restarting the container fixed it. I think I'm going to use uptime kuma for now

anderconsu avatar May 10 '23 15:05 anderconsu

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Aug 09 '23 01:08 liss-bot

Still relevant.

ohmantics avatar Aug 09 '23 03:08 ohmantics

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Nov 26 '23 01:11 liss-bot

Still relevant

bdovaz avatar Nov 26 '23 10:11 bdovaz

I also run Dashy with many other things on my Rpi 3B+ with 1GB RAM and Dashy is consuming very few MB and barely any CPU even when starting up.

Can you confirm if you are running x64 or x32 ?

CrazyWolf13 avatar Jan 01 '24 13:01 CrazyWolf13

This issue was automatically closed because it has been stalled for over 1 year with no activity.

liss-bot avatar Apr 27 '24 01:04 liss-bot

Auto-closing bots are a project management smell.

ohmantics avatar Apr 27 '24 01:04 ohmantics

Auto-closing bots are a project management smell.

I haven't gotten any confirmation that it is still relevant, so the bot did everything correct.

CrazyWolf13 avatar Apr 27 '24 05:04 CrazyWolf13

Still relevant

bdovaz avatar Apr 27 '24 07:04 bdovaz

Then please answer the question I asked above.

Instead of ranting on the bot!

CrazyWolf13 avatar Apr 27 '24 09:04 CrazyWolf13

In my case x64

bdovaz avatar Apr 27 '24 10:04 bdovaz

@bdovaz @ohmantics

Hi Could you test this with the :latest tag by repulling and rebuilding the app?

Keep in mind V3 has breaking changes: https://github.com/Lissy93/dashy/releases/tag/3.0.0

CrazyWolf13 avatar May 10 '24 22:05 CrazyWolf13

Not seeing the original issue now. It did take several re-pulls for the build to complete without errors; not sure why since it says "possible error, check logs" and there are no logs to see.

ohmantics avatar May 10 '24 23:05 ohmantics