Memory leak?

Im running hassio and have a problem with it crashing at least once per day. This started when I was running my system on a dedicated NUC. I since then created a new environment in VMWare on a different machine but the same keeps happening.

It seems like the memory usage skyrockets right before it crashes.

The system is all up to date, so no missing updates/patches.

Anyone with some ideas? Im about to give up.

You may check this post:

My RPI system usually has to be rebooted via unplug and repowered once a week. I am hanging out for the Amber system but I notice it starts off really well but after a few days starts to go downhill. I am convinced something in my system has a memory leak. Just doing the latest operating system updates and the last 2 normal updates as I was hanging off thinking it was stable. I am looking for the point where it becomes stable for a few weeks again and then I will stop updating till I get some new hardware

Memory leaks are not related to hardware but software instead. Do you have custom components? If yes did you try to disable all and retry?

Yes I realise that memory leaks are due to badly written software. I used to program and I can tell you I have caused a few myself. The reason i mentioned hardware is I don’t want to spend all the time doing this and then have to spend more time again when I change hardware. Just want the system to hang in there and do the work once.

Hi I have experiencing memory leak starting with 10.x currently running core-2021.11.1 (docker). Ive been disabling integrations one by one to see which one causes the leak. In fact it was UPNP integration for me on a Archer router device… when looking at other complaints on github im noticing its sometimes printers and also UPNP. Its my current impression that all / some UPNP (or some) are affected. BTW the integration itself on for example an Archer is far from stable it looses connection and data points quite often. I can confirm that disabling that UPNP integration memory is stable.

1 Like

I was having a similar problem as shown in this chart:

After disabling what I could run without, i ended up removing remote assistant, and HACS and re-installing. I was going to put in an issue however when I re-installed everything to see if it was reproducible it seems to be working ok now. The flat spot in the middle was with HACS removed, the last few restarts were related to reinstalling HACS and remote assistance. Running on RPI 4 B 4GB rev 1.4

had another crash on nov 22nd, no obvious errors, or useful messages. I did notice after restarting that glances was showing a lot of critical iow/s. Upgraded to a faster sd card, and installed the 32 bit operating system. will update how it runs in a few days.

had another freeze a couple of days ago, first since the change in SD card speed.

Just wanted to chime-in to say that I’m currently experiencing the same problem, after I updated to 2021.11.5 (don’t know from which version, I usually update every few months)

I mentioned my issue here - no solution yet, I’m still in troubleshooting mode: Home Assistant Core shutting down unexpectedly - Installation - Home Assistant Community (

I’ll start disabling integrations and monitoring, if I find a clear culprit I’ll post an update here

Solution found: at least in my setup, the SpeedTest integration was the culprit. It was running with the default configuration yet it has some sort of memory leak which was causing my system to consume more memory until it became unresponsive and had to he restarted.

You can see below from the tests I did; I was suspecting of both the SpeedTest and Waze integrations, but in the end Waze was OK, and SpeedTest was the culprit.

I found that I was running out of swap space as my swap file size was still at the default size of 200Mb, increased it to 2 GB’s and have not had a problem since. I followed the suggestions under the topic “How to increase the swap file size on Home Assistant OS”

I use HAOS in VMWare ESXi 6.5 and is there is some issue with memory.

I had built a brand new v7 HAOS and I was up to version 2021.12.7 of HA. My system reported some updates were available so go and do the HA first up to 2021.12.9, the memory use goes up in my VM. Then do the 7.1 update of HAOS and then it goes to fuey.

The system refreshed from the update page and shows that both updates are still required, but now the VM is using all the memory it has available. So I have told the VM to shutdown so that I can free up that memory, restart never frees up the memory and it took an eternity to shutdown. The VM was set to 4GB of RAM as per suggested set up and that is why the graph flatlines at 4GB:

The first change in memory is when I did the HA update, the second spike is when I initiated the HAOS update.

Once the machine was shutdown you can see the memory goes to 0 as is expected, to try and help alleviate this problem in the future I have doubled the amount of available RAM to 8GB.

After rebooting the computer, I found that both updates had not applied. Let’s try again.

After rebooting I did the 2021.12.09 update, it started at the first yellow line and didn’t finish until the second yellow line, it took a while. As you can see the memory climbed considerably but was never cleared.

I then did the HAOS 7.1 update which was very quick and it started around the purple line, again the memory usage went up, but was never released when finished.

This how much the system is reporting as using, plus the version of HAOS never updated: