2021.2.1 Continual memory increase. (similar to back in Oct 2020)

Back in October 2020 there was a case of the Brother Printer integration causing continual use of memory, gobbling it up until the Home Assistant device crashed and rebooted.

Since updating to core 2021.2.1 in the last few days, this memory increase has started again. For the moment, I have removed the Brother Printer integration. This seems to have stopped the memory increase. Can someone else confirm if their RAM is being used up? And if they’re able to remove the Brother Integration and see if it stops?

@hunterjm I believe you helped look into the Brother Printer issue back in Oct 2020 (where we first thought it might have been an ONVIF issue).

Same issue here. downgraded to 2021.1.5, had no memory increase. Updated to 2021.2.2 now and removed the brother integration. Lets see what that does.
Strange thing is, that I have some friends that have the brother integration and don’t have any issues…

2021.2.2 without brother integration… Seeing the same behavior as before, a saw like pattern and slowly rising memory usage :frowning: Before the dip I was running 2021.1.5

So I don’t think its the Brother integration

Same here, and I don’t use Brother integration… in 24hours running the RAM usage slowly increased from cca 150 to 350MB. I cant tell for sure, if this started with 2021.2.0 or 2021.2.1, since I discovered it only yesterday.

Hi SiriusGen,

I can confirm, gad the same effect. Memory growing after update to 2021.2.0 and 2021.2.1
Yesterday evenning I let the brother printer active in standby and the increase had stop, the memory use was stable over night. This morning I deinstalled the Brother Integration and performed a full Boot of my pi. Since 5 hours no increase - memory stable as with 2021.1.5 and same memory consumption.

Okay, I’ll take my words back, it does look like it’s the Brother integration

Mem usage is still stable after removing the Brother integration. Added it again now and now wait what is going to happen with the mem usage…

Update: mem usage is still stable. So removing the Brother integration and re-adding it seems to have worked. Will leave it now and will post an update in about 12 hours or so.

There was a fix for this a few months back. So hopefully the devs will see it, or those who are in the same circles to highlight it again. @hunterjm

Memory usage is still stable. so removing and re-adding Brother integration does the trick.
But also strange that friends of mine don’t have these issues. 1 only once, rebooted and no more issues.

HACS had an update, installed it en restarted HA… and memory usage is increasing again! :triumph: :rage:

Totally done with the Brother integration, removed it and restarted HA core. Mem usage is stable again.
Won’t use it again…

My laser printer was only turned on when I needed to use it. Didn’t seem useful having it on standby for literally 30 days at a time and then turned on for a full 5 minutes use, and then turned off again. Home Assistant was only being updated each time the printer was turned on (to print invoices a couple of times a month).

I have also removed it from my system for now. It was fun to keep track of the paper count and graphs of the ink levels, but its causing more problems than it’s worth.

Same here. asked a friend of mine who has a Brother and the integration if he uses it often. Yes he does, so he is testing now, turned the printer off and restarted HA. And see if the memory usages increases.
I have a feeling it does…

We have an issue open about this: https://github.com/home-assistant/core/issues/45959 if someone want to add more info there.

Thanks. I will post some details over there.

I am not sure if it is just brother. I don’t have that custom component and I am experiencing memory leaks as well with 2021.2.1. Not sure which component is causing the issue.

There were a few culprits last time round; ONVIF and RING DOORBELL were another two that came up in the last thread where folks did not have the Brother integration installed. I don’t recall what the outcome was for those issues. I only know about the Brother Printer Integration being the issue for me, which was solved. There is a discussion happening about it now, so hopefully they will find and fix in the next few days.

1 Like

My friend confirms it, shutting down Brother printer, restart HA and memory usage increases.
He also removed it now. doesn’t really use the integration, same as me. Nice that it’s there, but if it results in these issues it’s no use.

It’s not in the integration itself, because there were no changes in that. But somehow since HA core 2021.2.x, the core handles the errors differently which causes a memory leak or something.

Instead of rebooting every 4-5 hours I have moved my CORE back to 2021.2.0. HA is very responsive and everything is working without issues.

To revert back install Terminal from Supervisor add-on store. After installed open the webui for terminal. Then type: ha core update --version=2021.2.0

Your system will reboot and become very responsive along with the memory leak being contained.