Database disk image is malformed. Anyone know what this means?

2017-12-01 06:37:20 ERROR (SyncWorker_4) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'SELECT states.state_id AS states_state_id, states.domain AS states_domain, states.entity_id AS states_entity_id, states.state AS states_state, states.attributes AS states_attributes, states.event_id AS states_event_id, states.last_changed AS states_last_changed, states.last_updated AS states_last_updated, states.created AS states_created \nFROM states JOIN (SELECT max(states.state_id) AS max_state_id \nFROM states JOIN (SELECT states.entity_id AS max_entity_id, max(states.last_updated) AS max_last_updated \nFROM states \nWHERE states.last_updated >= ? AND states.last_updated < ? GROUP BY states.entity_id) AS anon_2 ON states.entity_id = anon_2.max_entity_id AND states.last_updated = anon_2.max_last_updated GROUP BY states.entity_id) AS anon_1 ON states.state_id = anon_1.max_state_id \nWHERE states.domain NOT IN (?, ?)'] [parameters: ('2017-11-26 22:59:38.735320', '2017-12-01 11:37:08.004404', 'zone', 'scene')]

All I did was change some configs and restart hass.io, does my SD card maybe have bad sectors or something?

Did you ever resolve this?

I don’t recall… I more than likely reformatted and started over :confused: I think it was the result of a few power outages corrupting my card.

i have this quite often just delete the homeasistant log file, restart homeassistant again and it will create a new log file again, somthing to do with it getting currupt or too big

This is specifically a sqllite error.
https://www.sysinfotools.com/blog/fix-error-sqlite-database-disk-image-malformed/ has some info about it.
I was using a sql sensor for zigbee.db for ZHA and ran into this.
Fortunately I have a weekly backup as my database was really broke.