1
0
Fork 0
mirror of https://github.com/louislam/dockge.git synced 2026-03-03 02:06:55 -05:00

Dockge eating 100% cpu #37

Closed
opened 2026-02-20 13:09:45 -05:00 by deekerman · 13 comments
Owner

Originally created by @officiallymarky on GitHub (Nov 21, 2023).

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I noticed my CPU was pegged at 100% with node, so I did a docker stats and I see dockge is eating 100%+ cpu.

image

👟 Reproduction steps

installed w/ basic docker compose

👀 Expected behavior

minor cpu usage

😓 Actual Behavior

all the cpu usage

Dockge Version

1.1.1

💻 Operating System and Arch

Ubuntu 22.04

🌐 Browser

N/A

🐋 Docker Version

24.0.7

🟩 NodeJS Version

No response

📝 Relevant log output

I checked logs, there really isn't anything happening, yet it is chewing all the cpu.
One thing that maybe the problem, but not sure, is I am running dockge stack inside the same stack folder, I know in the docs it has it outside of it.  Dockge seems to be confused by this and shows it as inactive.  I am not sure if this is related or not. 

I have a lot of containers running, some very complex and even when it isn't at 100% Cpu (when I restart it), it is using way more cpu than any other container by far.
Originally created by @officiallymarky on GitHub (Nov 21, 2023). ### ⚠️ Please verify that this bug has NOT been reported before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/dockge/security/policy) ### Description I noticed my CPU was pegged at 100% with node, so I did a docker stats and I see dockge is eating 100%+ cpu. ![image](https://github.com/louislam/dockge/assets/33408375/832fcedb-8d1a-4019-bc64-761a0e80bec7) ### 👟 Reproduction steps installed w/ basic docker compose ### 👀 Expected behavior minor cpu usage ### 😓 Actual Behavior all the cpu usage ### Dockge Version 1.1.1 ### 💻 Operating System and Arch Ubuntu 22.04 ### 🌐 Browser N/A ### 🐋 Docker Version 24.0.7 ### 🟩 NodeJS Version _No response_ ### 📝 Relevant log output ```shell I checked logs, there really isn't anything happening, yet it is chewing all the cpu. One thing that maybe the problem, but not sure, is I am running dockge stack inside the same stack folder, I know in the docs it has it outside of it. Dockge seems to be confused by this and shows it as inactive. I am not sure if this is related or not. I have a lot of containers running, some very complex and even when it isn't at 100% Cpu (when I restart it), it is using way more cpu than any other container by far. ```
deekerman 2026-02-20 13:09:45 -05:00
Author
Owner

@AlmightyFrog commented on GitHub (Nov 21, 2023):

Same here. This is the command ps shows doing the load

/usr/local/bin/node --require /pnpm/global/5/.pnpm/tsx@3.14.0/node_modules/tsx/dist/preflight.cjs --import file:///pnpm/global/5/.pnpm/tsx@3.14.0/node_modules/tsx/dist/loader.mjs ./backend/index.ts

@AlmightyFrog commented on GitHub (Nov 21, 2023): Same here. This is the command `ps` shows doing the load `/usr/local/bin/node --require /pnpm/global/5/.pnpm/tsx@3.14.0/node_modules/tsx/dist/preflight.cjs --import file:///pnpm/global/5/.pnpm/tsx@3.14.0/node_modules/tsx/dist/loader.mjs ./backend/index.ts`
Author
Owner

@becks0815 commented on GitHub (Nov 22, 2023):

Can confirm this. "Only" 10% CPU usage here, but this is on the same level like the transmission demaon, which is pushing 10 MB/sec at the moment, while dockge is idle.

Otherwise: great software, it does what portainer doesn't - show the logfile of containers/stacks

@becks0815 commented on GitHub (Nov 22, 2023): Can confirm this. "Only" 10% CPU usage here, but this is on the same level like the transmission demaon, which is pushing 10 MB/sec at the moment, while dockge is idle. Otherwise: great software, it does what portainer doesn't - show the logfile of containers/stacks
Author
Owner

@calvinklink commented on GitHub (Nov 22, 2023):

CPU pegged at 100%. i5-4590 running on SATAIII SSD, Ubuntu Server 22.04.3.
If I restart dockge it's fine. It seems to happen when restart/stop/start actions are performed, mostly at random. Seems to happen more when containers are stopped.
dockge_cpu

@calvinklink commented on GitHub (Nov 22, 2023): CPU pegged at 100%. i5-4590 running on SATAIII SSD, Ubuntu Server 22.04.3. If I restart dockge it's fine. It seems to happen when restart/stop/start actions are performed, mostly at random. Seems to happen more when containers are stopped. ![dockge_cpu](https://github.com/louislam/dockge/assets/123595709/a571017b-fd9e-4567-846a-c35459e7e3d7)
Author
Owner

@louislam commented on GitHub (Nov 22, 2023):

Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4.

I suspected it is related to this: https://github.com/louislam/dockge/pull/60

But without reproduce steps, it is hard to debug.

@louislam commented on GitHub (Nov 22, 2023): Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4. I suspected it is related to this: https://github.com/louislam/dockge/pull/60 But without reproduce steps, it is hard to debug.
Author
Owner

@becks0815 commented on GitHub (Nov 23, 2023):

I can only provide some software info: docker on Ubuntu 22.04, Docker version 24.0.7, build afdd53b. I spotted the issue while looking at dozzle, showing me the CPU usage of all containers, but I have no idea if this is caused by some runtime issues and the program starts fine and without eating the CPU, but it is existing.

If I can run any programs/scripts and paste the output here, just mention what I could do to help.

@becks0815 commented on GitHub (Nov 23, 2023): I can only provide some software info: docker on Ubuntu 22.04, Docker version 24.0.7, build afdd53b. I spotted the issue while looking at dozzle, showing me the CPU usage of all containers, but I have no idea if this is caused by some runtime issues and the program starts fine and without eating the CPU, but it is existing. If I can run any programs/scripts and paste the output here, just mention what I could do to help.
Author
Owner

@calvinklink commented on GitHub (Nov 23, 2023):

Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4.

I suspected it is related to this: #60

But without reproduce steps, it is hard to debug.

I don't know if it will get you any closer, but I have noticed it's particularly with Nextcloud's official container, I think. It's the only container that has a persistent volume which also happens to be on a ZFS raid.

@calvinklink commented on GitHub (Nov 23, 2023): > Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4. > > I suspected it is related to this: #60 > > But without reproduce steps, it is hard to debug. I don't know if it will get you any closer, but I have noticed it's particularly with Nextcloud's official container, I think. It's the only container that has a persistent volume which also happens to be on a ZFS raid.
Author
Owner

@mbtechtt commented on GitHub (Nov 23, 2023):

Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4.

I suspected it is related to this: #60

But without reproduce steps, it is hard to debug.

I believe that may be the case as I installed Dockge on my Fedora 38 system and I noticed the same issue. I have the same issue of 100% CPU usage, and it tends to happen after using the console for either the system or individual containers.

You can rule out 100% CPU being attributed to an Ubuntu specific issue as the system I have tested Dockge on runs Fedora. But it may be a x64 platform specific issue, which could be preventing you from recreating it on a Raspberry Pi.

My Fedora 38 system is a laptop with an AMD CPU.

My server is running Ubuntu 22.04.3 and uses an Intel CPU. I will test Dockge on my server and see if the 100% CPU usage issue occurs on Intel as well (Will post an update when I have done so). No one mentioned if the processors they use are AMD or Intel, but it is possible this is a factor. I highly doubt it, but I will still test it out when I have some free time.

@mbtechtt commented on GitHub (Nov 23, 2023): > Need reproduce steps and more info, I cannot reproduce even on my Raspberry PI 4. > > I suspected it is related to this: #60 > > But without reproduce steps, it is hard to debug. I believe that may be the case as I installed Dockge on my Fedora 38 system and I noticed the same issue. I have the same issue of 100% CPU usage, and it tends to happen after using the console for either the system or individual containers. You can rule out 100% CPU being attributed to an Ubuntu specific issue as the system I have tested Dockge on runs Fedora. But it may be a x64 platform specific issue, which could be preventing you from recreating it on a Raspberry Pi. My Fedora 38 system is a laptop with an AMD CPU. My server is running Ubuntu 22.04.3 and uses an Intel CPU. I will test Dockge on my server and see if the 100% CPU usage issue occurs on Intel as well (Will post an update when I have done so). No one mentioned if the processors they use are AMD or Intel, but it is possible this is a factor. I highly doubt it, but I will still test it out when I have some free time.
Author
Owner

@louislam commented on GitHub (Nov 24, 2023):

@BossMBGaming I actually tested on arm64/armv7/amd64, still cannot reproduce. I think it is not related to hardware or os.

I believe it is related to https://github.com/louislam/dockge/pull/60, but I don't have evidence, as I cannot reproduce.

@louislam commented on GitHub (Nov 24, 2023): @BossMBGaming I actually tested on arm64/armv7/amd64, still cannot reproduce. I think it is not related to hardware or os. I believe it is related to https://github.com/louislam/dockge/pull/60, but I don't have evidence, as I cannot reproduce.
Author
Owner

@louislam commented on GitHub (Nov 25, 2023):

image

I am able to reproduce by deploy/delete/deploy/delete nginx stacks, using the console and clicking around the settings.

I connected the debugger, but the weird things is that it is so normal in the debugger. I suspected it is related to tsx.

@louislam commented on GitHub (Nov 25, 2023): ![image](https://github.com/louislam/dockge/assets/1336778/d9b477f4-c46f-4eca-9bed-d2877431bd59) I am able to reproduce by deploy/delete/deploy/delete nginx stacks, using the console and clicking around the settings. I connected the debugger, but the weird things is that it is so normal in the debugger. I suspected it is related to [tsx](https://github.com/privatenumber/tsx).
Author
Owner

@louislam commented on GitHub (Nov 25, 2023):

Still digging into it. I think it is actually related to node-pty which is used for connecting to "docker compose up/down/restart"'s console. It will sometimes full load the cpu and don't return any data.

I think #143 #169 are caused by this too.

@louislam commented on GitHub (Nov 25, 2023): Still digging into it. I think it is actually related to `node-pty` which is used for connecting to "docker compose up/down/restart"'s console. It will sometimes full load the cpu and don't return any data. I think #143 #169 are caused by this too.
Author
Owner

@R0GGER commented on GitHub (Nov 25, 2023):

@louislam I've send you an email.

@R0GGER commented on GitHub (Nov 25, 2023): @louislam I've send you an email.
Author
Owner

@louislam commented on GitHub (Nov 26, 2023):

@louislam I've send you an email.

Thank you so much. It is able to reproduce now, but I am still struggling on how to identify the issue.

@louislam commented on GitHub (Nov 26, 2023): > @louislam I've send you an email. Thank you so much. It is able to reproduce now, but I am still struggling on how to identify the issue.
Author
Owner

@louislam commented on GitHub (Nov 26, 2023):

Maybe a related issue: https://github.com/sagemathinc/cocalc/issues/6963

@louislam commented on GitHub (Nov 26, 2023): Maybe a related issue: https://github.com/sagemathinc/cocalc/issues/6963
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dockge-louislam#37
No description provided.