Memory leak after updating to 2022.4?


So after updating to 2022.4.0 memory usage started to creep up. See trend. Drop in memory consumption in 8.4.2022 was due to update to 2022.4.1. Leak seems to be in core. Increase rate roughly 1.2%/5h.
HW: Raspberry pi 4 8gb and Home Assistant OS.

1 Like

Same here…Core is eating ram constantly on my Raspberry PI 4 with Home Assiatnt Supervised after April update…wondering if there will be a stop point or if the system will hang (hope not).
Regards

Same here. Updated to 2022.4.1 directly. Also processor usage is different compared to 2022.3.x (higher intervals). I was hoping it comes from optimizing the data base after updating. But trend did not stop until now.

2 Likes

Same thing for me, running on Proxmox. Thought I messed something up because I recently added a few new devices so I increased available RAM from 8GB to 12GB but it will just eat it up. So I have to reset the VM. I wish I would have captured the console because I’m pretty sure there was a kernel panic the last couple of times I’ve rest it. I’ll try to get it and update this post, because until it’s fixed there will be a next time!

Yep same here. Memory was very very stable until the upgrade.

It’s pretty clear when the upgrade was done.

As this is not happening to everyone, you guys should work out what 3rd party integrations you have in common.

Add-ons

Zigbee2mqtt
Mqtt
File editor
Google backup

Hacs

Dahua
Spotcast
Xiaomi cloud map extractor (not used)
Local Tuya
Browser mod
Fontawesome
Webrtc camera
Bureau of meteorology
Fully kiosk browser
Garbage collection

Integrations

Generic camera
Browser mod
Esphome
Garbage collection
Hacs
Google cast
Goodwe
Aussie broadband
Speedtest
Bureau of meteorology
Cpu speed
Izone
Lifx
Local Tuya
Radio browser
Mosquito broker
Notifications for Android tv
Shelly
Spotify
Roborock s5

I can tell you it is not these because I use them and do not have the issue:

Add-ons

Zigbee2mqtt
Mosquitto

Hacs

Dahua
Bureau of meteorology
Garbage collection

Integrations

Generic camera
Esphome
Garbage collection
Hacs
Speedtest
Bureau of meteorology
Cpu speed
Lifx
Radio browser
Mosquito broker
Shelly
Roborock s5

I reported this in the beta, I was told it was due to the new caching setup that’s been implemented.

I’m also seeing this. There’s definitely an increase. Running HA Core here, almost no integrations, pretty much bare bones:

MQTT
Generic camera
Met.no
Pyscript
Alarmo

That’s it. I also disabled a ton of the default ones, like cloud, zeroconf, mobile_app, ssdp. So it’s none of those either.

So uhm, it’s intentional ?

That’s what I’m told…

And uhh, it grows to what size then ? This is rather strange. Got a link to the issue ?

Dunno, mine looks like it’s topping off at about 33% usage.

We didn’t create an issue, it was noticed by myself and Thanasis.

I can quote you the bits from bdraco about the memory creep:

bdraco 03/31/2022

You should see some memory creep up for the first 24 hours and then it should stabilize as caches are being built.

Here’s the discord link to the start of it:

Mine topped out about 99% when it crashed at 3am.

Yeah mine will go to 100 if I let it… 3 days after upgrade it’s still happening so not related to a cache rebuild I don’t think

Thanks. Seems that for some people it stabilizes and for others it doesn’t. Or there’s another unrelated memory leak.

I can’t risk this to happen to my production system, so I downgraded for now until this issue is resolved.

Feel free to open an issue on github.

If it levels off after a few percentages points it’s likely caches being built.

These graphs look like a memory leak.

It looks like it’s also causing a cpu bump which is good because it will make it easier to find with a py-spy recording

1 Like

We’ve seen several reports and are investigating it in this GitHub issue.

We need py-spy dumps to know what is going on in your instance. See this comment for instructions on how to gather this information.

1 Like

No it’s definetly not related to 3rd party integration as I installed a copy of my production system to a speare raspy 4,removed all the integrations (just seeing the sun integration on the dashboard) and seeing the same slowly memory growing up.
Reagrds.

1 Like