Memory leak: How to find whats causing it?

Since a few weeks my HA has a major problem with a memory leak.
HA container gets bigger an bigger over the day, until HA gets unresponsive.
At the moment my “solution” is to run a automation that restarts my HA every night.
I was never able to find the reason that is causing the memory leak.
Is there a way to solve this?
I run the latest version of HA and all installed extensions on a 4Gb Raspberry 4.

You could connect to the Pi and use “docker stats” to show you the current memory usage of each container. This would narrow it down to (probably) an add-on.

Note that you can’t use a terminal add-on to do this, as that runs in a container itself and does not have access to docker commands. If you don’t have the Pi connected to a monitor and keyboard, you can use SSH over port 22222 to connect, if this has been configured. This addon simplifies configuring the port.

Problem is, it is the Home Assistant container itself, that increases the memory.
Whats causing the problem inside is not visible for me.
I have attached a screenshot taken using glances.

Youll need to go in with docker exec -it homeassistant bash then run top, free or do other troubleshooting within the container. Your 4G of RAM is a bit low. You may need more.

Okay. Thanks for that. Tried top, and there is a Python process inside the HA container that seems to produce most of the load.

Hello!
Did you solve this problem?
Looks like I have the same…

Actually not.
My “solution” at the moment is, to restart the HA container daily at night, where no one / nothing is really using it.

Well my ha instance is currently using little less than 1 GB of ram. This is not concern for me as I have 20 gb. As I saw from your post you probably don’t use docker based installation. In docker you can easily manage mem and cpu consumption by containers. You can try to limit memory usage for this container in portainer but this is not permanent solution. It will wok till you restart ha. In my opinion only permanent solution will be to move to docker based installation on a normal pc.

I’m seeing a memory leak in Home Assistant OS 12.2 when running in Proxmox 8.2.2. At reboot, HAOS is using approximately 4 GB (out of 8 allotted), but it climbs over a few days. I first noticed it when I had the memory set to 4 GB and HAOS was crashing the overall environment.

Up until recently, it was running fine in 4 GB, but I got tired of it crashing and so bumped that up to 8. I hadn’t made any new configuration changes—only HAOS and Proxmox updates.

I have a similar setup with Proxmox and 8GB of memory. I noticed that if I do Developer -> Restart Home Assistant a couple of times the memory usage becomes near or at 8GB until I reboot the VM. Not sure if this information is useful for debugging.

Has a solution for this been found? I have haos installed in a vm on proxmox that I noticed the ram creeps up a little every day, just as described in this post

I am having the same problem. I had been using HAOS on an RPI 4 8GB. The fan died, so now I’m on a Dell Wyse 5070 with 8GB and no native storage drive. I had been running HAOS from an SSD, so just moved it over to the new box. I have only recently had reliability issues with Home Assistant, so is it caused by an update? Or have I done something wrong by moving the SDD from RPi to the Thin Client? I did Etcher for the new HAOS on the Thin Clent on the drive and restored a full backup to it. Problem is, I don’t know enough about the programming and troubleshooting to know what I don’t know?