Sqlite3 data base could not be validated

Ever since I updated OS 18.1 I have been getting this warning error. It happens at about 4am.

The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly

HA restarts and comes back OK. I notice it restarts my “UPTIME” tells when HA was last started.

This is out of my expertise can someone give me some assistance please.

If you are running a server that uses an SD card as the main storage device, start looking there.

I am using a NUC with a SSD.

I googled the “warning” error from log and got this reply

  • If this message only appears as a single Warning log right after a reboot, but Home Assistant functions normally and displays historical data, the system successfully recovered using its Write-Ahead Log (.db-wal ).*
    Can I reply on this advice and ignore it as it only does appear at HA restart?
    HA and history seem all intact?

All help gratefully received.

A bit later..
I updated HA OS to 18.2 and error did not present in HA core when system rebooted HA restarted

The issue is still there
Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:271
Integration: Recorder (documentation, issues)
First occurred: 11:48:26 AM (1 occurrence)
Last logged: 11:48:26 AM

The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
It is also listed as an issue in githib #167499

The issue persists so I have decided I will copy the database file to another file name and delete the current one. Restarting HA generated a new database but I lose history. That’s not a big drama as I am running Grafana and it should have the history I need anyway.
I will see if this fixes the issue and report back.

The Issue persists!!!
The removal of old database and having HA recreate it automatically did not work .
From my logs

Logger: homeassistant.components.recorder.util
Source: components/recorder/util.py:271
Integration: Recorder (documentation, issues)
First occurred: 5:02:05 AM (1 occurrence)
Last logged: 5:02:05 AM

The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly

What next?

Yesterday I Deleted the //config/home-assistant_v2.db on my HA and let HA recreate it after restart.
Some 7-8hours later it did the same thing and I got this same recorder error.
Can Somone who is in charge of RECORDER please look at this and give me some advice please? It is a bug or is it something else??
HELP please!!