Since a month or so, my home-assistant is crashing about once a day, complete at random times.
I can’t recall any specific change or something like this which can be the source, so, I tried to look at the logs but that’s quite a puzzle.
How can I see what is the root cause of the crash ? (or is someone willing to help me with that ?)
First make sure you are on the latest and greatest HA versions !, Both OS, Core n Supervisor
A reboot will flush/rotate your logs, so you can “begin” troubleshooting on a “fresh” ( Logs/Version )
This way you can check the booting part, and eventually after a crash.
in your /config(homeassistant) folder you find your logfiles home-assistant.log + home-assistant.log_1 ( latest is the “old” after a reboot/restart & and after a crash !)(use file-editor, samba-share, or similar)
PS: so after a crash, the x.log.1, is the one to look in, if you restart again, it will be lost/rotated, and the timeline you wish to look at is “gone”
So a log/time-line, where you can identify/knows it crashed, occurred, is obviously what you want to look into
In UI /Setting/System/Logs you find “core-log” in the top-right corner, you can click “core-log” and find additional logs
Please do look into both core & host etc. even after a crash/reboot , to see how it’s “doing/feeling”
You can look for i.e extensive/repeatedly “errors” and/or " timeout/connection Errors"
It Not a Puzzle, it’s a “sequence” scenario
i.e , After A comes B, B comes prior to C(rash) , so with fresh updated system, you get a more useful timeline to follow
Please have a look for your self, try to understand it, look for Errors/timeouts/connection-failure, and then only post relevant parts from the log, prior to the crash (. log.1) but also at startup( if there is lots of related errors etc) ( . log)
PS: Just for the cause of it, always check the ( . log.fault ) also ( if it’s larger than 0b )
Well, I looked at the .1 log after a crash but could not find anything in there, not even multiple times.
However, I noticed a trend and that is that HA is crashing every night at 2:00 am exactly.
So, that sounds like some “cleanup/maintenance” thing and I suspected the “Ubiquity Unifi add-on” (because it’s doing DB maintenance) so, I disabled that one and now HA already stable for two days.
Have to investigate on what exactly is going on with that add-on but happy I can pin-point this now.
Thanks for the help.
I have the same problem. Raspberry Pi 4, Argon ONE M.2 enclosure, and an SSD. The temperature isn’t too high, and I have a powerful power supply. No log files are written when the crash occurs. HomeAssistant crashes spontaneously and is no longer accessible. HomeAssistant can only be revived using the power button.
After connecting the SSD to the external USB3 port using an adapter, HomeAssistant works smoothly again.