Help investigating RPi Crash

Hello, I’ve been using Home Assistant for years now, but I always had to deal with crashes on the instance running on my RPi 4 Model B. A some point, the system will start to slowly become unresponsive until it becomes unreachable. Some services (like ZHA and the UI) are always the first to die.

The distance between these occurrences is completely random, sometimes it will happen after a less than a day, while others it could take weeks before the system crashes again.

I believe the main culprit to be the external SSD attached to it (the OS is completely offlloaded on it, no SD card present) or worse the USB stack itself. I’m saying this because I noticed that everytime a crash occurs, I would always find the SSD with the activity light constantly blinking.
This would also explain why the system will take some time to breakdown instead of crashing abruptly.

When I try to check the logs, be it the entity registry, AdGuard requests or journalctl, I always find a hole in the data, making it impossible to diagnose the root cause of the issue.

Did you ever encounter similar issues? Do you have any solution, or can you suggest me a way to diagnose this behavior? Maybe it’s possible to use the empty SD card slot to make a scheduled copy of the logs in order to have a backup (they should somehow be stored on memory, since the main storage is not a reliable destination).


Hardware
Raspberry PI 4 Model B (4GB)
SSD:

SSK Portable SSD 128GB
DEVLINKS: >-
  /dev/disk/by-diskseq/28 /dev/disk/by-id/ata-SATA_SSD_MX_00000000000000019
  /dev/disk/by-id/usb-SSK_SSK_Storage_DD564198838FE-0:0
  /dev/disk/by-id/wwn-0x50000000000028b9
  /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0
  /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usbv3-0:2:1.0-scsi-0:0:0:0
DEVNAME: /dev/sda
DEVPATH: >-
  /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2/2-2:1.0/host0/target0:0:0/0:0:0:0/block/sda
DEVTYPE: disk
DISKSEQ: '28'
ID_ATA: '1'
ID_ATA_DOWNLOAD_MICROCODE: '1'
ID_ATA_FEATURE_SET_PM: '1'
ID_ATA_FEATURE_SET_PM_ENABLED: '1'
ID_ATA_FEATURE_SET_SECURITY: '1'
ID_ATA_FEATURE_SET_SECURITY_ENABLED: '0'
ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN: '2'
ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN: '2'
ID_ATA_FEATURE_SET_SMART: '1'
ID_ATA_FEATURE_SET_SMART_ENABLED: '1'
ID_ATA_PERIPHERAL_DEVICE_TYPE: '0'
ID_ATA_ROTATION_RATE_RPM: '0'
ID_ATA_SATA: '1'
ID_ATA_SATA_SIGNAL_RATE_GEN1: '1'
ID_ATA_SATA_SIGNAL_RATE_GEN2: '1'
ID_ATA_WRITE_CACHE: '1'
ID_ATA_WRITE_CACHE_ENABLED: '1'
ID_BUS: ata
ID_MODEL: SATA_SSD
ID_MODEL_ENC: >-
  SATA\x20SSD\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PART_TABLE_TYPE: gpt
ID_PART_TABLE_UUID: 78dfb754-d33b-4312-8b24-f9e9c1a5b65c
ID_PATH: platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0
ID_PATH_TAG: platform-fd500000_pcie-pci-0000_01_00_0-usb-0_2_1_0-scsi-0_0_0_0
ID_PATH_WITH_USB_REVISION: platform-fd500000.pcie-pci-0000:01:00.0-usbv3-0:2:1.0-scsi-0:0:0:0
ID_REVISION: H220614a
ID_SERIAL: SATA_SSD_MX_00000000000000019
ID_SERIAL_SHORT: MX_00000000000000019
ID_TYPE: disk
ID_USB_DRIVER: uas
ID_USB_INSTANCE: '0:0'
ID_USB_INTERFACES: ':080650:080662:'
ID_USB_INTERFACE_NUM: '00'
ID_USB_MODEL: SSK_Storage
ID_USB_MODEL_ENC: SSK\x20Storage
ID_USB_MODEL_ID: '0580'
ID_USB_REVISION: '7601'
ID_USB_SERIAL: SSK_SSK_Storage_DD564198838FE-0:0
ID_USB_SERIAL_SHORT: DD564198838FE
ID_USB_TYPE: disk
ID_USB_VENDOR: SSK
ID_USB_VENDOR_ENC: SSK\x20\x20\x20\x20\x20
ID_USB_VENDOR_ID: 152d
ID_WWN: '0x50000000000028b9'
ID_WWN_WITH_EXTENSION: '0x50000000000028b9'
MAJOR: '8'
MINOR: '0'
SUBSYSTEM: block
TAGS: ':systemd:'
USEC_INITIALIZED: '2525893'

Other hardware: ConBee II gateway from Dresden Electronics
(I went through different power supplies, both battery operated and not, didn’t solve the issue)

Software (latest as of today)

  • Home Assistant OS 15.2 (64bit)
  • Core 2025.5.3
  • Supervisor 2025.05.3
  • Frontend 20250516.0

Using File Editor, Samba or SSH addons, go to your HA folder > config > and search for home-assistant.log.1. That’s the log from before the crash, and it’s always preserved unless the restart happens more than once.

PS - if you’re using an SSD, it might be a good idea to connect it via a powered USB hub. The Pi may not have enough juice on its USB ports to power the SSD.

I already looked at the logs from the previous boot (both using journalctl and by looking at the backup log with debug SSH). The entries look completely normal, but they stop suddenly about half an hour before I reset the PI (I usually notice that it’s dead because DNS stops working).

Before resetting the power, I tried connecting to it to check, but Nginx (which is running as an add-on) returned 502 and the SSH connection was being refused.

I don’t think the issue could be caused by power delivery to the SSD, as it should happen way more often than this.

If you have VSCode addon running, the issue is probably caused by that. It eats up memory and never returns it.

Otherwise, try these these 2 guides. Hopefully they’ll help point you in the right direction:

Thanks, I will try the new debug mode to search for misbehaving integrations, although I’m not using any niche one.

I’m running only basic addons on this instance, so the memory usage is always ~50%
CPU is 0% most of the time.

I’m hoping it will crash soon at this point (so I can try to catch any errors that might show up).

1 Like

I would try to eliminate insufficient power to the SSD first before doing a deep dive.

Go to Settings > System > Logs > Host(top right dropdown) and keep an eye out on the logs there. If you see something like “undervoltage detected”, that’s definitely your culprit.

Can’t find anything like that, unfortunately.
I’ve also had the Raspberry Pi Power Supply Checker integration installed since HA was running on the RPi2, and it never reported any issues.

I changed the power supply three times in the last years, and it kept crashing.
Same issue also after I switched to a PoE hat.

Let me repeat myself for the sake of clarity.

Changing the power supply or using the Power supply checker integration will not detect insufficient power going out of the USB ports. Those USBs are current limited, and SSDs are notoriously power hungry. You could feed your Pi with a 25A power supply, and it would still not be able to deliver enough power to the SSD.

To be fair to you, I shouldn’t have led you down the path of the Host logs, because even those might not report insufficient power being provided to the SSD via USB.

See if you can get your hands on a powered USB hub. Get a cheap one or borrow one if you have to. It’s a quick way to troubleshoot an issue which is quite common in these forums.

I had an sd card that was dying, or fault at least, in an RPI 3B a while back.

See this post, explains how I came to that conclusion. Basically, you could try and make an image/readout of the current sd card, and see if a program like win32diskmanager can do that, or if it fails. If the latter, I’d wager it may be the sd card.

They’re not using an SD card. The first post makes it pretty clear

Hi, as a Raspberry PI user, I have seen many MicroSDs fail under my eyes.

After Home Assistant OS introduced the possibility to be installed on an external drive, I immediately reinstalled it on the external SSD I mentioned before.

I reflashed the bootloader and the RPi is configured for full USB boot, so no SD card is required.

I completely misread that sentence :man_facepalming:
Ignore what I said, apologies for the off-topic post.

1 Like