HA freezes randomly and only come back after power off and on again

Hello! I’m having constant issues with my HA freezing randomly — I can’t access UI and can’t connect via SSH, automations also stop responding. Only a hard power-off/on brings it back.

No errors in the logs before reboot. I’ve enabled debug logging and even added a system-wide watchdog script to monitor CPU, memory, and I/O (with the help of ChatGPT) — everything looks stable up until is not.

I’m using a Raspberry Pi5, with the official power supply (27W, USB-C) and an SSD (connected via Geekworm X1001 PCIe to M.2 NVMe). Also, I have migrated it to MariaDB thinking it could be some issue with SQLite but I had no success.

I have enabled debug logs but it shows no errors, it just stops showing anything until it freezes , then I need to power off and on, and the logs continues from the restart.

My configuration.yaml is like this:


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

recorder:
  db_url: mysql://homeassistant:homeassistant@core-mariadb/homeassistant?charset=utf8mb4
  commit_interval: 30
  auto_purge: true
  purge_keep_days: 7

homeassistant:
  debug: true

logger:
  default: info
  logs:
    homeassistant.bootstrap: debug
    homeassistant.setup: debug
    homeassistant.loader: debug
    homeassistant.config_entries: debug

Is there any way to see the logs right before the crash? I have no idea what to do next.

Thank you guys!

Yes. In your config directory there will be a file named home-assistant.log.1 that contains the logs from before the last restart.

Also this:

Could be your issue. The power supply is not rated for all the peripherals you can add. Try an externally powered USB hub.

Hello Thiago,

The homeassistant.log.1 file if it still is being made is the last log before the reboot. They are considering removing the log file and instead using the UI, but I don’t know if that happened yet.

However the symptoms you describe have been power problems(supply inadequate or going out), the connection to the usb-ssd, and other things.
See more here:

Hi,
Is there any discernable pattern to the freezing or recent changes made (updates, add-ons, integrations etc) that coincide with this?

Yes. In your config directory there will be a file named home-assistant.log.1 that contains the logs from before the last restart.

@tom_l @Sir_Goodenough In my home-assistant.log.1 there is nothing unusual, just the logs of automations being triggered (which right now is just one automation, as I disabled all others)

Is there any discernable pattern to the freezing or recent changes made (updates, add-ons, integrations etc) that coincide with this?

@nickh66 No patterns that I could see, sometimes it takes two or three days to crash, sometimes just a few hours.

Initially (few months ago) I set up the HA using a SD Card, but it stopped working from one day to another and I couldn’t even read the SD Card, so after couple of months without using it I changed to SSD, but I kept the same power supply (this one).

Do you guys know which power supply I could use? I have found that there is 45W version of the same power supply. Would it be enough?

Also, I have attached to it a Sonoff Zigbee Dongle, the consumption is just 25mA but anyway it still consumes something.

Then check out the info in SG’s link.

With pi’s its not necessarily the PSU but more to do with the usb sockets maximum power. So even putting a 100w psu on it will not allow any more power through the usb.

If you have other usb devices they will also be sharing the usb power.

a powered usb will solve it, and the lack of enough power through the usb does not show up in logs as far as I know.

I don’t know if this thing uses USB power:

EDIT: this is definitely something you shoud check out:

https://geekworm.com/en-au/products/x1001

Maximum current for PCIe wire is 1A, and voltage is 5V.

If you find that the SSD is not working properly, it is possible that the power supply of SSD is not enough, then you need to check the current requirement of your SSD to decide whether power the SSD separately.

What model SSD are you using?

The SSD is connected directly to the RPi using the Geekworm adaptor I mentioned. The SSD is this Kingston NV3

This is my setup:

Unfortunately Kingston do not publish any meaningful specifications regarding power consumption so it is impossible to say if this is your issue. You could try powering it externally and see if it helps.

My gut says power issues. Its been a while since I played with RPi’s and never touched a pi5. But I did come across many issues trying to power ssd’s and dongles on a pi4.

Guys, thanks for the replies. I will try with a powered USB hub to power the SSD (and possibly the Zigbee Dongle), and then I’ll reply to this post again in a few days with a follow up.