Home assistant / Python3 specifically is sucking up all my CPU causing my homeassistant to overheat. The fans go full speed and it sounds like a hurricane.
I have tried disabling all my integrations ( screenshot above taken with all integrations off and as you can see my CPU is still going crazy.
I ran the profiler but honestly have no idea how to read this. It seems the red block is the problem base_events:1910_run_once and maybe because of that blue box to the lower left of it that says discovert:347. It also seems to have quite a bit of activity if I am reading this right. First time trying this so not sure what I am looking at to be honest.
A little more background. This just started happening about 2 weeks ago ( at least that’s when I noticed it). The system doesn’t seem to slow down much when this happens but I can hear it struggling.
When I reboot it, the machine calms down but it seems that overnight something happens that causes it to spike up to 100 again. Once its up there it doesn’t go back to normal until a reboot is performed.
What version of HA are you running? Did you have any updates before you noticed it 2 weeks ago?
Unfortunately, that screenshot from profiler is too small to actually read. (I have some guesses as to what that is but I will refrain until I see version info and possibly a clearer picture of that red box )
I upgraded again yesterday in hopes that a bug had been resolved but after a reboot yesterday, I am back at the same high CPU this morning. Here are the new version numbers.
After many searches, I think I may have bumped into the reason for the high cpu with python. My searched led me to this forum post.
I do purposley block anything going out of my firewall that I did not set up myself and noticed that the cloudflare DNS was being blocked on my gateway after reading the post.
This morning I ran the command below ( please read the other post as there are some things to check before running the command ) and CPU is not down to regular levels but it seems to be going down gradually over the last 15 minutes. I will continue monitoring and post later if this is the final solution. If it is, it seems I can go about it two ways. Disable the DNS fallback or allow the DNS to cloudflare from my gateway. I opted to disable the fallback for now.
The Command to run from ha terminal …
ha dns options --fallback=false
While it seemed to lower my cpu at the time, it has not resolved the issue. I have noticed that it alwaya seems to happen over night. I’m thinking maybe a malfunctioning automation but I don’t see any that are actively running. How can i dive deeper into what python3 is really doing in ha?
I’m not sure why or how but I noticed HA was running low on hard drive space. I expanded my hard drive on my HA proxmox VM to eliminate the space issue and the problem disappeared.