HA dies every morning

I moved to SSD about six months ago and got an official power supply for that reason - no problems so far.

but I DO have an official Pi 4 power supply…

Sorry - I was replying to @tom_l 's dubious shrug.

Is there anything else powered by the usb ports? Like a zigbee/zwave?

You can enable system monitor, if you haven’t already. It will record ramped up processor/memory before the crash if that is the case.

sensor:
  - platform: systemmonitor
    resources:
      - type: memory_use_percent
      - type: memory_free
      - type: processor_use
      - type: processor_temperature

I am using the monitoring, yes . No spikes in CPU, RAM or temp before the die-off. I’ll add that to the post. Thanks.

The Pi has the obligatory CC2531 connected, nothing else beside the SSD. No voltage warnings.

Reddit tells me the USB 3 controller may overheat and cause a hang. It doesn’t have a sensor. I’ll try to stick a heatsink on it. Jesus this SSD on RPi stuff is picky :slight_smile:

Are you using one of the known working adapters? Can you disconnect the zigbee dongle for the night? The original pi power supply is the minimum recommended supply for a pi4 with an ssd.

Yes I am using the recommended ASMedia one. I’ll try unplugging Zigbee as the last resort, I have a lot of important stuff on it. Thanks!

i also have similar problem. hangs every alternate day 6.11am…yesterday I increased the swap size. and today It didnt stop at scheduled (!) time, still running. i will observe a week, lets see.

1 Like

That uses an NVMe hard drive? IIRC they draw more power under load than a sata version. If you have a powered usb hub, you could use that to power the zigbee dongle.

No, SATA SSD.

It happened again, at the same time. Nothing of interest in log, no apparent spike of any kind. I’m returning back the SD card as I can’t deal with this right now (it’s a bitch to diagnose as it only ever happens at 5AM, and there’s a toddler involved who absolutely requires a working zigbee device around that time). I’ve ordered (another) powered USB hub and some heatsinks and will give it a go later. If I have to choose between unreliable solution that’s been working flawlessly for 2+ years (I have backups) or a reliable one that dies for no apparent reason every day, I’ll take the former :slight_smile:

Thanks y’all!

update:
it’s been running without any hangs for 5 days since I increase my swap from 1GB to 3GB. I did see some spikes in the swap size and actually, its current value is more than the default value. perhaps you can try increasing the swap size give it a try.

Thank you, I just went back to the SD card and it’s smooth sailing since. I don’t have the time to troubleshoot hardware for no good reason :slight_smile:

You should use the datadisk option which is a lot more stable than USB booting

First time I see this mentioned. Also, if it happens after almost a full day of operation and not around the boot time, is it really due to this? Thanks anyway, I’ll look into it!

It’s more complicated than that yes. Another issue is that it works fine for a while then it deteriorates till it hangs forever. This usually this means you need to add quirks to the drive.

But datadisk is more recommended especially these days when it’s only a click away from the Supervisor panel.

I’ll probably stay on the SD. It’s rock solid, has been for over two years (it’s a heavy duty Sandisk card with around 90 MB/s speeds), and I have daily backups. And the speed difference are almost non-existent on a Rpi4. I tried to go to SSD specifically to avoid (potential) corruption, but all I got is the exact thing I’m trying to avoid in the first place, so… Bad luck probably, but still.

heavy duty Sandisk card doesn’t mean it will last you forever. Just today someone on Discord was complaining they got one of those and it corrupted withing weeks. All it takes is something continuously writing to it (e.g. creating daily backups isn’t helping either).

I’m not trying to push you to the SSD. I’m only saying any SD card that is continuously written to is a disaster waiting to happen.

I know and understand all that. I did make the move to SSD and was struck by immediate problems (and I’m apparently not alone). So the rational choice is to use what works, and with automatic cloud backups, a restore when it potentially (or eventually) fails, is a matter of literally minutes. No disaster at all.

Thanks!

Not really, continuously writing to it is not a problem at all if your card is large enough. Most high quality SD cards have some form of basic wear leveling built in. The problem is when your card is so small that parts of it need to be overwritten again and again. If you have a card with lots of unused free space, then the memory controller will just write into the empty space instead of overwriting existing cells.

I’ve been using the same Sandisk extreme for close to 4 years now I think, around two on HA and previously on Domoticz. Not a single issue. My backups and the database are on a NAS though. Especially the db can cause massive amount of writes.

1 Like