Home assistant container fills up my ram and swap in a minute after upgrade

Hi guys, please help me.

My setup is a raspberry pi5 with raspberry pi OS, and home assistant in docker container.

Everything was working smooth until I updated my container to 2025.4 just released.

Now as soon as home assistant container starts up, it fills up all my RAM and swapfile and then my raspberry is totally unreachable and needs a physical power off and on.

I tried to raise my swapfile from 200mb to 4gb (!!!) and it fills up the same!

In desperation I tried to downgrade and logs said database was newer and something was wrong. so I even restored from yesterday’s backup.

Despite that, the problem remains somehow.

Any advice?

I was able to save the log this time: https://pastebin.com/fcUzNWhE

edit: tried to fire up docker HA container on my main computer, with 32gb of RAM. In a few seconds all my ram was filled and even my computer freeze up.

Not a fix but you can set limits for docker container memory/cpu. At least only container with lock and not host.

Check any 3rd party integration
Start in safe mode?

EDIT
No reports in GitHub so my monies on a integration

forcing docker compose to use 2025.3.4 AND setting a memory limit of 1GB seems stable and working at the moment!
I’m really happy as I did not slept this night wondering what to do and how lost I was at the idea of starting from scratch and loosing months and months of intense personalization of ha.

The problem however remains, how can I understand what part of my configuration makes all this mess with 2024.4 ?

What integrations are you using?

Any HACS?

yes:
hacs
sonoff lan
browser_mod
watchman
google cloud speech-to-text (which gives some error in the log but seems common)
stream assist

setting cpu and memory limits in my docker compose seems completely ignored:

version: '2.4'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    mem_limit: 2g
#    mem_reservation: 2g
    memswap_limit: 1g
    cpus: "3"
    cpuset: "1"
#    deploy:
#      resources:
#        limits:
#          cpus: '3'
#          memory: 2000M
#        reservations:
#          cpus: '3'
#          memory: 1500M
    volumes:
      #- ./config:/config
      #- /var/lib/docker/volumes/homeassistant_volume/_data/config:/config
      - /opt/homeassistant:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
      - /var/log/:/log
      - /root/.ssh/id_rsa:/root/.ssh/id_rsa:ro
      - /root/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:ro
      - /root/.ssh/known_hosts:/root/.ssh/known_hosts:ro
      - /dev/input:/dev/input/
      #- /mnt/krogpc_smb:/config/krogpc_smb:ro
    devices:
     # - /dev/ttyUSB0:/dev/ttyUSB0
     # - /dev/ttyUSB1:/dev/ttyUSB1
      - /dev/hidraw0:/dev/hidraw0
     # - /dev/hidraw1:/dev/hidraw1
      - "/dev/input/"
    restart: unless-stopped
    device_cgroup_rules:
      - 'c 13:* rmw'
    privileged: true
    network_mode: host



something wrong with my compose?

we are close to a solution, as I was able to reboot in recovery mode with 2025.4 and the system is stable. Now I need to narrow down the culprit.

Edit: the issue is with Stream Assist, as in recovery mode I disabled all custom integrations, restarted and then enabled them one by one, and as soon as I re-enable Stream Assist my ram is eaten in mere seconds.

Thank you!