Memory leak with Z-Wave devices

Here is a report of a memory leak I am experiencing with HA 0.76.2: home-assistant#16225.

Here is an example of the memory being eaten regularly:

I have restarted manually at the middle of this graph.

See the github issue for more information, but it looks like as soon as i enable z-wave, of of the device eats all memory.

Workarround for the moment: monit rule with “if memory usage > 40% for 5 cycles then restart”.

Any idea on how to debug it?

1 Like

I’ve had some random reboots of my docker container and I suspect this might be the culprit. I will see if I can reproduce this week to provide some additional data points.

Any idea on how to investigate my leak? Can I disable all devices and enable them one by one?


I mean, monit does a good job at killing Home Assistant once it reach 60% ram on my small Raspberry Pi, but I would be glad to have it fixed!

It won’t be caused by any specific device, but (if there is a leak) a bug in the OpenZWave libraries.

1 Like

noone else experience this leak? Maybe because I am on a small device. I hadn’t this leak on Domoticz which is also using open-zwave. I see some memory leak fixes (open-zwave#1504) on this project, maybe it will be fixed soon on rpi.

My HA drops between 570MB then back up to 610MB free it does nothing like yours does.
Note: I do not restart HA in this snapshot.

I’m running Home Assistant on a Pi3, and have been for long over a year. I don’t see any sign of a leak.

No issues here with a lot of Zwave devices in use.

Seem to have been fixed, or at least partially fixed, with 0.77.2:

It still increase memory usage over time, but much slower. But I am not sure which changes did that.

All my Z-Wave devices works, but they always appear in “Initializing state”:
It did not do that in previous versions (only the SRT321 which is i sleep mode because on battery)

I’ve only got a couple of devices connected through a USB adapter, but my memory usage is generally as flat as a tack; been that way for as long as I’ve used Z-wave.

I’m seeing the same behavior as @gsemet on 77.3; my memory use rises steadily by ~12 percentage points per day. I have about 10 Z-wave devices. I’ve also had some serious connection issues with a few of the devices over the past 2 weeks (door sensors never updating to “closed”, lock dropping every request even after heal/refresh).

I’m hoping the upgrade to 78.3 will help.


I am running on 0.79.3 and I have a similar issue. My network is currently still small but with long distances, so I am not able to have 2 or 3 redundant paths for each device. But nevertheless it was working perfectly for several months. Since a couple of weeks I have also troubles with my Fibaro Door Sensors not reflecting the correct state…


I wondered for a long time why my Pi3 would freeze every now and then after a while. I added monitoring now and see the same memory use increase @ about 10-isch % per day previous version 0.79 as well as current 0.8…
I would love to dig into this a bit. Any good pointers to start debugging this on hassio?
Thx in advance!

I personally have the same problem but no idea where to start debugging. My Hassio on RPi3 crashes regularly now and has done for a few months. I only recently realized it was a memory leak problem but I don’t use the MQTT broker which apparently tends to be one of the culprits.

Start debugging by disabling RAM intensive components like Tensorflow. Any component processing images will spike your RAM usage hard.

Finally, update to 0.94.4 seem to have fixed this memleak:

Process memory usage is now flat :slight_smile: