Random freezes using a RPI 4 B

For a few months I have been having an issue where my PI running HA OS completely locks up and will only respond again with a cold boot.

-I am using the stock power adapter that came with the pi (wall to usb)
-Checked to see if it was thermal related, replaced case with ICE Tower)
-SD Card is what came with the unit

Not sure what else to check and the log files don’t seem to help as they clear upon reboot.

Check error logs see if any clue in there. config/homeassistance.log

  1. faulty data base - delete the database file
  2. faulty card, try new card

which log would you suggest looking at? I haven’t seen anything like that when I have seen log info.

inside config folder

and the large .db file… some time it can be corrupted and froze HA can be safely delete (loose history)

I have looked at that log and nothing shows indicating any storage or db issues. Unfortunately, since the logs are reset upon reboot it’s hard to figure out what is happening. my DB file is 864MB, and the history is something I use.

Menu>supervisor>system>log provider and look at various logs there see any clue

and check storage and. cpu usage see if anything odd. else try a new sd card. A2 class SD cards are good for OS type application

I would consider clearing the database

Everything looks good. The only “errors” that exist are from integrations and nothing to worry about. I really don’t want to throw money at this hoping to fix the problem, especially if it doesn’t fix it.

Is there a way to verify the integrity of the DB ?

yeah, we assuming that it not the pi itselt that faulty.

integrity check passed. I am pretty sure this was a new build, I had tried to migrate from an old Pi and gave up. This is a fresh install on a new Pi (from when I did it) Is there a way to output debug info to the console so when it does freeze I can see what was the last thing to take place?

logger:
  default: debug