There seem to be two, possibly unrelated, issues in the thread. Most people experience Home assistant to become unresponsive (web, ssh) but still running. The other issue is system crashing or restarting.
I experience the former on RPi3B, HA only runs for less than a day before hanging, sometimes it only takes hours. It started after I made several changes to my setup - switched from SD card to SSD, added zigbee dongle (cc2531), installed influxdb and grafana. Before it ran without a hick up for years.
After many attempts and ruling out both mentioned addons and the dongle itself, my best bet is on memory. Possibly a memory leak somewhere as the root cause. This is what I see:
In my case, each spike corresponds to the HA hanging.
I checked the swap and as expected, it was at 100% all the time. After consulting How can i increase my swap file size? · Issue #968 · home-assistant/operating-system · GitHub and How to increase the swap file size on Home Assistant OS, I increased the default 227MB to 2GB. A day later, with all the addons running the swap stabilised on 400MB and the memory on 70% with occasional spikes to 80%. No issues so far, it’s running fine. I don’t want to be overly optimistic but I think I found the culprit.
If you’re hitting the same issue as me, try increasing swap size (on ssd disk! Not a great idea if using SD card). For a more robust solution, upgrade to RPi4 with 4GB/8GB RAM or Intel NUS with 4GB+ RAM.
3 Likes