operating-system: HAOS memory leak?

Describe the issue you are experiencing

HAOS is using about 2.4GB of memory after a reboot. Immediately after the reboot, the memory usage climbs at a rate of 10 MB every 10 minutes. If Core is restarted, the memory usage doubles after the first restart, and goes up by 1 - 2 GB the next time. After that, HA will eventually hang and the VM stopped to recover. This is something I’ve noticed as HA Core restarts every day at 0100. Have not focused on that once it appeared that was causing the out of memory condition.

I have been rebooting proactively daily as that is the only way the memory used in the VM is returned. I am not sure how to troubleshoot this so I figured it might be better to open an issue. The graph below shows the memory used on the VM over the last week. image

I’ve tried to do all I can to find the issue, but I’ve run completely out of ideas.

What operating system image do you use?

ova (for Virtual Machines)

What version of Home Assistant Operating System is installed?

9.2

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

  1. Reboot HAOS
  2. Monitor memory usage

Anything in the Supervisor logs that might be useful for us?

Nothing in the log.

Anything in the Host logs that might be useful for us?

Nothing

System Health information

Home Assistant 2022.10.3 Supervisor 2022.10.0 Operating System 9.2 Frontend 20221010.0 - latest

Additional information

HA is running on Proxmox version 7.2-3. System has one other Linux container on it that has Frigate running. Other than the disk space, that container uses very little resources. CPU < 5% and memory < 1GB I have tried stopping all my addons one at a time and watched the system to see if the behavior changes, it doesn’t.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (5 by maintainers)

Most upvoted comments

I apologize for not posting the current status of this issue for me at least. I crafted a post a couple weeks back and must have failed to hit the submit button. The issue was never resolved, but given the issues it was causing I had to find another solution. That solution was to dump HAOS and run HA as a container. I moved all the addons into their own containers and configured to work with HA. Since then I have had zero issues. Rock solid on the same hardware. The underlying OS is Ubuntu running Docker. Seems this is still an issue, but not sure if it requires me as the original poster to continue working to resolve.

I am experiencing the same problem, not sure since when exactly but it might be that it started after one of the recent HA updates. There has been no new integration/add-on added to my system. The attached screenshot shows a histogram, and it clearly indicates a systematic increase of RAM usage (memory leak?) which results in a self-reboot situation once the memory overflows. Any advice is highly appreciated.

Home Assistant 2022.11.4 Supervisor 2022.11.2 Operating System 9.3 Frontend 20221108.0 - latest

Screenshot_20221124-222216_Home Assistant

It has been a while since the console got to a point where it hangs. I will try a new VM and see if there is still the same issue. May take me a little bit of time to get to that done this week.