RPi5 Home Assistant Randomly Restarts

For 3 years I used home assistant with a RPi4, with DB MariaDB. A few months ago I switched to DB for SQLite. Last week I switched to a Raspberry Pi 5, hat, SSD, and power supply 27W. all new original Raspberry pi. I restored the backup and I am having trouble restarting randomly. The only errors I see are from the database.

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

Ended unfinished session (id=3 from )

It has happened to me that the database file was corrupted and I rebuilt the database again (original SQLite) and it happened again.

my file “home-assistant_v2.db”, after 3 days, is 64 Mb

temperature does not exceed 30 °C, and ram of 30%

Can someone help me?

Does the SSD have it’s own power supply ?

no. it’s the Raspberry hat and ssd 256GB NVMe 2230

i think we have the same problem here:

i even went to pick up a ssd kit today because i thought maybe its the sd cards…

we have a identical setup

I’ve gone 3 days without restarting, and I’ve restarted 3 days on the same day

yes also my rpi restarts and show the db error…

i created now a completely clean setup without restoring from any backup… lets see how it goes