HASS OS becomes unresponsive / then almost unusable / and is finally dead - starting every ~ 10 hours after last HA start

Yeah there’s definitely something wrong my installation too.

cpu_use

No errors in any of the logs, nothing occurring when the CPU use starts climbing. Happens every day or two.

I’m relatively new to HA.
I’m running HA on a Raspberry model 4.
At this moment, I’m only using the integrations Node-red, Denon Heos, Onvif, Zwave, KNX.
I still have plenty of RAM, SSD available. CPU % is always less than 10%

The core on my Raspberry hangs nearly every week, and stops doing automation or measuring.
A ping to the PI still is OK. A connection with the UI times-out. Until now, I’m always doing a hard reboot (power off). But this empties also the log file

Is there a way to keep an archive of the log files? So that at least I can try to find the problem in the older log file from before the hard reboot.

Does a watchdog mechanism exists for the Core on my PI, which reboots automatically?

Switched from Pi 3 B+ to Pi 4 B (8 GB) yesterday. Immediate effect on the CPU and of course RAM, now no swapping etc.

1 GB of RAM definitely is an issue on a Pi device.

Just a quick update (I hate unresolved topics… :smiley:) :
To everyone arriving in this topic and having similar issues I’d strongly recommend to have a look at this GitHub issue: https://github.com/home-assistant/operating-system/issues/1119#issuecomment-761696480

For me since switching hardware it is “fixed” (or “worked around”), where the issue itself still exists.

1 Like

Hi!
I was having the same problems that froze my raspberry pi (raspberry pi 3b 1 gb RAM with SSD).
Reading in the forums I tried to increase the size of the swap file. I followed the instructions given at the link

I also created an automation to restart the home assistant host at night.
This solved my problems (iI am convinced that increasing the swap file is sufficient, reboot the host empties the swap file but 2 gb is a lot…).

The idea came to me by creating a system monitor and noticing that the system freezes when the ram ran out and the swap file got saturated

While I „fixed“ this issue for me by switching to a more powerful hardware (Pi 4 with 8 GBs) and this is more like a workaround, I need to fully agree with you: running another service on the same hardware some time before Home Assistant, I had pretty similar issues (for months) that could be prevented tweaking the SWAP file settings. Larger one and resetting it regularly is probably the best way to go to buy some time with hardware with limited RAM amount.

Aside from switching hardware this is the way to go to work around this „low RAM“ based issue. I‘ll mark this one as solution.

I may be off the mark here, but when I had this issue, it was caused by my database becoming extremely bloated. I had a motion detector in a very busy part of the house that was writing its state 1000s of times an hour. This would very quickly inflate the database size. Turning off the logging of the sensor stopped this issue.

Not one sensor, not the database - more likely it’s the storage of the database which can’t handle the IOs.

Upgrading hardware helped.