Hello,
I have had an issue with my home assistant installation for a few weeks, and I can’t get rid of it.
It all started by discovering that the Web UI was not available. I restarted the device, and all went back to normal. For about 30 minutes. Then again, the Web UI was not available.
Here was my setup at that moment :
- Raspberry 3B+
- SDCard
- HAOS
- Generic AC Adapter
- Z stick GEN5 from AEON LABS
The only issue I could see was SQL errors due to a database upgrade. Each time I restarted the device, the database upgrade will start, errors look like:
[homeassistant.components.recorder.util] Error executing query: (sqlite3.IntegrityError) UNIQUE constraint failed: statistics.metadata_id, statistics.start
[SQL: CREATE UNIQUE INDEX ix_statistics_statistic_id_start ON statistics (metadata_id, start)]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
I also had error like kworker process killed. So I went through a hardware cleanup. I did a full backup, replaced the generic AC Adapter by a Raspberry Pi official AC adapter, replace the SDCard with a X850 USB adapter + an mSATA SSD drive. Then I reinstalled HA-OS, restored the backup and…
Same.
The database upgrade will start at reboot, and fail with the same error.
Web UI will not be available after a while (from 5 to 30 minutes). SSH connection will be lost too, and even direct USB keyboard won’t have any result. The console just won’t respond, no key received.
However, the device will respond to PING and TELNET commands.
After a reboot, the home-assistant.log won’t show any new error explaining what happens.
I have disabled every integrations with no result either.
I suspect the database upgrade to be responsible for this issue, since it happened after an upgrade (by memory, I would say 2022.2.6. I managed to upgrade to 2022.2.9 before another HA freeze, but no more luck. Also, there’s no way to prevent database upgrade or to manually execute it to check if it’s really the culprit.
My Z-wave setup and dashboard are quite complex (to my knowledge) so I would really prefer determine what is happening before considering starting back from scratch.
Any help to diagnose this would be greatly appreciated, please and thank you.