Hello together,
every few days my HA is also crashing and I can find those errors in my log files.
I am absolutely not sure what causes the issue.
Yesterday I took a new SSD and did a fresh install and restored an old backup.
So I think that the DB can’t be corrupt.
Is that assumption correct?
I also did the following in the past:
- on a running instance I copied the DB to my device
- did the integrity check
- no issue
Was that correct in the way to check?
Thank you. I have absolutely no clue on what I can check in addition …
This are the errors found related to SQL:
2:10:25 PM – (WARNING) Home Assistant Supervisor - message first occurred at 2:10:24 PM and shows up 5 times
/addons/core_deconz/info return code 500
2:10:25 PM – (ERROR) Home Assistant Supervisor - message first occurred at 2:10:03 PM and shows up 8 times
Error while processing event StatisticsTask(start=datetime.datetime(2023, 5, 31, 12, 5, tzinfo=datetime.timezone.utc), fire_events=True): [Errno 30] Read-only file system: '//config/home-assistant_v2.db' -> '//config/home-assistant_v2.db.corrupt.2023-05-31T12:10:24.828445+00:00'
2:10:24 PM – (ERROR) Recorder
The system will rename the corrupt database file //config/home-assistant_v2.db to //config/home-assistant_v2.db.corrupt.2023-05-31T12:10:24.828445+00:00 in order to allow startup to proceed
2:10:24 PM – (ERROR) Recorder
Can't read Supervisor data:
2:10:24 PM – (WARNING) Home Assistant Supervisor
Could not fetch changelog for core_deconz:
2:10:24 PM – (WARNING) Home Assistant Supervisor - message first occurred at 2:10:24 PM and shows up 5 times
/addons/core_deconz/changelog return code 500
2:10:24 PM – (ERROR) Home Assistant Supervisor - message first occurred at 7:49:08 AM and shows up 7 times
Unrecoverable sqlite3 database corruption detected: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO statistics_short_term (created, created_ts, metadata_id, start, start_ts, mean, min, max, last_reset, last_reset_ts, state, sum) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id] [parameters: (None, 1685535024.2400837, 63, None, 1685534700.0, 6108.217472046666, 6108.0, 6109.0, None, None, None, None)] (Background on this error at: https://sqlalche.me/e/20/4xp6)
2:10:24 PM – (ERROR) Recorder
Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: INSERT INTO statistics_short_term (created, created_ts, metadata_id, start, start_ts, mean, min, max, last_reset, last_reset_ts, state, sum) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id] [parameters: (None, 1685535024.2400837, 63, None, 1685534700.0, 6108.217472046666, 6108.0, 6109.0, None, None, None, None)] (Background on this error at: https://sqlalche.me/e/20/4xp6)
2:10:24 PM – (ERROR) Recorder
Lost connection to UniFi Network
And as mentioned, did a reboot, copied the DB and checked … no issues …