-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak #47884
Comments
See the same here.. Had more reboots the last couple of days than in the whole of last year (and I was home a lot) |
Same here, I've opened an topic in HA community. I narrowed it down for now to : service set_location `Logger: homeassistant.components.profiler Memory Growth: [] |
I have the same problem. Looks like the problem started with 2021.3.x |
I have done a lot of testing in the last couple of days. I tried removing integrations that I thought might be the cause, but that did not help. It seems that every time anything happens (a sensor is triggered, a light is turned on, etc) the amount of memory used ticks up and is never released. I tested this with multiple integrations, both native and HACS. Same results. I am now restarting my HA container every 6 hours to prevent it from crashing. @bdraco You have been incredibly helpful in the past. Do you have any thoughts or suggestions here? |
Same here |
The leak is defiantly something to do with
|
Which integrations do you have installed/used? |
I have listed all of my integrations below. I did notice something interesting in my testing today. I'm running HA in Docker. I discovered if I set a hard memory limit, the HA container will eventually reach that limit and then hover there. I expected it to hit the limit and crash, forcing the container to restart. That never happened. However, with no limit the container will continue to use more and more memory until it freezes. So for now, I guess my hacky solution is to keep the memory limit in place. Also, here is my Profiler log output from the other day:
Native Integrations
HACS
|
Eh, I was wrong. It did hold out for quite a while, but it did give up and crash today. |
What I find kinda strange: Why are docker only clients effected? I would think if everyone using hass.io / supervisor version would also be effected my guess would be that this would get more priority. |
I'm seeing this as well and I think it might be due to Apple TV integration, based on what I'm seeing in my logs. Every day or two, my system will go from around 40% to 100% memory usage over a period of 10 minutes or so. Once it hits 100%, the UI crashes / becomes unavailable, but my ODROID still responds to pings. The only fix is to power cycle the ODROID. I set up some alerting and was able to watch the issue as it was occurring. Found that my logs were exploding with MRP errors related to Apple TV integration:
These log messages repeat a few thousand times as the memory usage climbs. Of course, these logs could be a red herring. Perhaps some other issue within HA is making Apple TV integration flip out? @postlund FYI |
It would be nice if we could get an other 2021.3.x release as this is a big issue I think? Even if it's only a week or so to 2021.4 |
I don't think that the problem is related to Apple TV. I'm not using it and I have also problems with a memory leak. Downgrade to 2021.2.3 resolved that problem for now. HA is running in docker. |
I also see the same thing and am not using any of integrations given above. |
This comment has been minimized.
This comment has been minimized.
I found an install that is leaking jobs and client sessions.
|
Unfortunately the system ran out of ram before I could dump the objects |
I've been having memory leak issues for a bit now as well, and have been resolving by restarting daily. For what it's worth, the integrations I've got in common with @mikesalz are: Native:
HACS:
I'm going to start collecting and tearing through heap dumps here in a bit. |
Please try 2021.5 beta https://rc.home-assistant.io/blog/2021/04/28/release-20215/#memory-leaks |
Hi, sorry for the lack of update. I switched over to the 2021.5 beta and it seems maybe the leak is slower, but it is still there. I can do a more examination and plot some times, if that would be useful. |
The problem
In the last few days I have noticed a terrible memory leak. RAM usage in increasing at the rate of almost 1 mb per second. If I don’t restart every few hours, HA gets up into the GBs in memory usage and crashes.
I am not sure exactly when this started, but I keep HA pretty updated. I am currently on core-2021.3.4. Running in Docker on a Synology NAS.
I don't see anything weird in the logs.
What is version of Home Assistant Core has the issue?
core-2021.3.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Unknown
Link to integration documentation on our website
No response
Example YAML snippet
# Put your YAML below this line
Anything in the logs that might be useful for us?
# Put your logs below this line
The text was updated successfully, but these errors were encountered: