Home Assistant Memory Suck

Hi

Over the past several days my HA installation (Raspberry Pi4 : 64 with SSD) has become unstable. It operates fine for 6-7 hours and then some services and integrations stop working, plus random service calls occur.

Initially I thought the problem was my Pi hardware as the issues tended to affect USB connected devices (Z-wave dongle & 2 x RS485). But also connections between HA and Nodered seemed to stop, MQTT had issue etc.

I then noticed that over time my processor loading was increasing and free memory decreasing & once memory got too low the issues seemed to start - which makes sense.

Shortly before the problems started I upgraded to OS8.5, so my suspicions now lie there. However I am not sure of the best way forward & I would appreciate some advice from others in the community. I see two options:-

  1. Fall back to OS 8.4 or lower & see if the issues are resolved
  2. Retain OS8.5 & delete integrations one at a time to see if I can find one that is the cause of the issues.

Option 1 appeals, but I am not 100% sure of how to do this. I think all I need to do is reflash the SSD with OS 8.4 & then restore my configuration from backups (I have a full backup from a couple of days prior to the issues arising - any yes I have already tried to just restore the backup but it made no difference). Is it that simple? The issue I see with this option is that at some stage in the future I will still need to upgrade the OS & the issues may arise again, so maybe better to find the root cause?

Option 2 will take more trial and error and potentially could end up with my having to stop using an integration until it becomes compatible with OS8.5.

Any thoughts/advice from the community much appreciated. Note I am good at following instructions, but my ability to understand code is very limited.

I’m not seeing this on OS8.5 so it is more likely to be one of your custom integrations being incompatible.

Option 2 is your best bet for tracking this down. You don’t have to delete them, you can disable them in Settings → Devices & Services.

To re-enable them use the filter button top right of that window to “Show Disabled Integrations”.

Screenshot 2022-09-03 at 08-58-43 Settings – Home Assistant

Then enable them under the three dots icon in the integration card.

Thanks - I will try disabling

Thanks for your suggestion

The issue is with Z-Wave JS. When I disable that integration free memory jumps back up to the same amount as just after re-starting the Pi & remains constant at that level. If I re-enable Z-wave the free memory starts to drop away again.

I will raise this as an issue on Github

1 Like