Home Assistant crashing 2 or 3 times a day

Not sure what is causing it

What could be causing it? I’ve since disabled the bambu lab integration incase its that as thats obviously throwing up lots of errors (which i assume is because my printer is actually turned off right now).

Help please?

You’ll have to give way more info in order for someone to be able to help you. What hardware? How much RAM? SD card, SSD? Docker, HAOS…???

1 Like

how do i attach a log file? as i have no idea what im looking for and when i paste it in im over the limit

Oh, not sure where that went as i thought i added it to the first post. Its a raspberry PI4 on an SSD and HAOS is completely up to date

  • Core2024.11.3
  • Supervisor2024.11.4
  • Operating System13.2
  • Frontend20241106.2

Also need How much ram is in your Pi, how many addons are you running?

4gb

addons:
esphome
eufy
file editor
govee to mqtt
google drive backup
matter server
matter bridge
MQTT
music assistant
openwakeword
ring-mqtt
studio code server
terminal and ssh
zigbee2mqtt

1 Like

This in has been a problem in the past due to memory usage. Try disabling this.

1 Like

I wouldn’t be able to give you much direction as HA set up is different for everyone. But here are some suggestions.

Could the SD card be worn out? If you can backup your HA and replace the SD card that may work.

This maybe drastic but if you get a new SD card and do a fresh install then you could gradually install applications. Just keep your current SD card should you wish to go back to that version of HA.

I have “Watchman” installed on my HA. This is a small application which monitors your system and gives a text file of missing entities and integrations which may be giving you difficulty. You can install that through the HACS (Home Assistant Community) application. Do a search for how to install both applications should you decide to go in this direction.

So rather than keep trying to fix something it may be best to start fresh on a new SD card (keeping the old one). My system – I have a Pi4 with an attached 250 gig SSD. I moved away from SSD cards as my HA seemed to be more stable using an external drive.

One thought though, and again this is from my experience on my own set up, could it be signal degradation? My Pi is about three feet from my main router so it gets a solid signal. Not sure if you are using a WiFi router but should you be you might start there as to how strong of a signal you may be getting.

Again, you might try backing up your HA and then a fresh install on a new SD card. Sorry you are going through this difficulty and I hope maybe some of my suggestions may help you out. All the best pal. And… try to walk away for a few hours on this and come back with some fresh ideas. Take care.

Wow…

believe you are probably running into memory exhasusion. I moved from my 4b 8GB to a NUC 10 (light years different perc btw) because I was crashing out exhausting memory with half those addons.

Additionally two of those are big consumers and allegedly slow memory leaker. (aforementioned studio code and open wake word)

If it’s not that and you’re on an SD card.then.thats the second thing if look at (get off the SD, long term) and finally potential undervolt from a hungry usb bus or failing power adapter.

But my bet is you’re out of ram, especially with some of the recent changes a pi3 2 g is the BARE MINIMUM to start with and you’ve blown that out of the water with all those addons.

Building on both @NathanCu & @Khamrun suggestions (and both, please feel free to update/add to the following since it can be edited), you may want to check this:

How to Troubleshoot Raspberry Pi Crashing.

2 Likes

thank you everyone.

ive now removed Studio Code and Open wake word.

im not using an SD card i have an m2 SSD

I was up and running for 24 hours and then suddenly it went down. I’ve been running HAOS in this way for almost 2 years now without major issues. And suddenly this week something has gone wrong. I havent done any major work on HA for months now apart from dashboarding

im happy to add logs if someone can let me know how to pinpoint the log that shows why it crashed rather than uploading a huge text doc of a week of data…

The previous log (something like log.1) is stored in the configuration folder look there first. When ha boots it takes existing log and renames it the starts a new log so the old one may have information on what was going on right before it cratered.

so im 99.9% certain its a memory leak as ive just spent the last 45mins looking at the memory graph. and im also 99.9% certain its the bambu lab integration. as i was stable yesterday as id turned it off having seen what looked like an error in the logs, turned it back on this morning and the memory has been climbing all day until this evening when it crashed. after reboot my memory usage was instantly up in the 70%s and creeping up. turned it off, rebooted, and its now stable in the 51% range.

im off to raise a bug on the github

1 Like

Visual Studio code 100% also has a memory leak. I have an automation that restarts it at midnight to recover the ram. You might find this helps with any others.

2 Likes

Memory leak, i agree. I have 16GB, so i pretty much don’t care, but here’s my situation on pic. Sometimes RAM goes down when i restart HA, sometimes it goes down by itself, but what really does it’s job is restart HAOS. So, as you see with “only” 4GB of ram things can happen…

EDIT: this is situation after HAOS restart (around 2GB, but it can go below that, too, to around 1.7GB):