SelfhostedPro / Yacht

A web interface for managing docker containers with an emphasis on templating to provide 1 click deployments. Think of it like a decentralized app store for servers that anyone can make packages for.
MIT License
3.32k stars 158 forks source link

[Bug Report] Dashboard high CPU usage #574

Closed niker closed 4 weeks ago

niker commented 1 year ago

Describe the bug I have 19 docker containers running on my machine and yesterday I thought I got hacked and someone installed a cryptominer background process. After some detective work I discovered the 30-80% CPU usage is caused by process /usr/bin/python3 /usr/bin/uvicorn which is running under Yacht. And the very dashboard I was using to diagnose the issue was causing the massive load. This load is present even if the dashboard is not the active page which is confusing. The dashboard also seems to load in 3 separate stages, as if the command times out and the rest is fetched on second/third try.

To Reproduce

  1. Use a low power machine like a PI4B
  2. Install sufficient number of containers (about 20+)
  3. Fry some eggs :)

Expected behavior Not sure if this is a bug or inefficiency in the polling process but suffice to say portainer barely uses any CPU time in comparison. Maybe the polling rate could be slowed down by configuration and the dashboard hardly needs refreshing when it's not an active page or yacht is not the active browser tab.

Screenshots obrazek

Desktop:

jre08 commented 2 months ago

OS: Synology Docker Yacht version: Unsure (I didn't have it installed long enough to get the info) Docker Containers: 28

I also experienced this behavior today, 6/27/2024. The Synology Resource monitor was showing the CPU at a constant 80% utilization (with no major tasks running). As @niker mentioned I discovered the uvicorn process was using the CPU 40% of the time, I then stopped the Yacht docker container (as I had just installed it) to see if it was causing the issue. After stopping the Yacht container the CPU utilization went back down to normal around 10% (@idle).