Home Assistant core running out of memory

Hello,

I run home assistant for over a year on an old dedicated thin PC. I keep it up to date in terms of versions.

ha info

arch: amd64
channel: stable
docker: 28.3.0
features:

  • reboot
  • shutdown
  • services
  • network
  • hostname
  • timedate
  • os_agent
  • haos
  • resolved
  • journal
  • disk
  • mount
    hassos: “16.0”
    homeassistant: 2025.8.3
    hostname: homeassistant
    logging: info
    machine: generic-x86-64
    machine_id: c0844c2ef3da4f9d99c24f318a5bf032
    operating_system: Home Assistant OS 16.0
    state: running
    supervisor: 2025.08.1
    supported: true
    supported_arch:
  • amd64
  • i386
    timezone: Europe/London

Since early Aug, I started having issues where browser an app sessions start disconnecting after a few hours, up to a day of running. After a reboot it usually works for a while…

The console shows repeating errors like:
[dddd.ddddd] Out of memory: Killed process dddddd (Python3) …
[dddd.ddddd] Out of memory: Killed process dddddd (hass-configurat) …

And these repeat with variations of the ‘dddd’.

I also had a look at the dmesg logs and I see the following error that could be linked to the start of the troubles:
[91500.919267] Out of memory: Killed process 423636 (hass-configurat) total-vm:290432kB, anon-rss:272548kB, file-rss:68kB, shmem-rss:0kB, UID:0 pgtables:636kB oom_score_adj:200

Any suggestions of what could be causing it or where to look? I am not sure if the disk is too close to full. But are there temp files that I can remove?

ha host info

agent_version: 1.7.2
apparmor_version: 3.1.7
boot_timestamp: 1755956679875818
broadcast_llmnr: true
broadcast_mdns: true
chassis: embedded
cpe: cpe:2.3:o:home-assistant:haos:16.0::production::::generic-x86-64:*
deployment: production
disk_free: 1.2
disk_life_time: null
disk_total: 28.6
disk_used: 26.2
dt_synchronized: true
dt_utc: “2025-08-24T15:31:40.104363+00:00”
features:

  • reboot
  • shutdown
  • services
  • network
  • hostname
  • timedate
  • os_agent
  • haos
  • resolved
  • journal
  • disk
  • mount
    hostname: homeassistant
    kernel: 6.12.35-haos
    llmnr_hostname: homeassistant
    operating_system: Home Assistant OS 16.0
    startup_time: 1.683659
    timezone: Etc/UTC
    use_ntp: true
    virtualization: “”

You show a lot of info; but the most important one is missing: how much memory does the PC have ?
Also : What add-ons are you running ?

Each update will typically add a little to the memory requirement.
It is not far back that RPi3 was removed from supported systems, because 1Gb had become impossible to run a basic setup with.
2 Gb is current the required value for a basic setup and if you want addons or bigger integrations, then 4Gb or more is recommended.

1 Like

You have less than 300MB of RAM?

Also, even assuming the below are in GB, 32GB is the bare minimum for a supported install nowadays. Ignore the RPi tag - same rules apply.

Was that 32Gb a typo?

Nope. 32GB is the minimum recommended disk space, which I’m assuming is what is being reported in the disk_total part.

Basically, the machine seems to have both low memory and low disk space

The ssd is 32Gb. I removed some redundant backups and it is running a bit better, as has more spare disk.

But since I now found how to check the core uptime, I can see it is rebooting very regularly.

RAM memory is 4Gb, which I thought is not too low? Anyway, I am planning to upgrade to 8G soon.

4gb should be fine unless you’re running a bunch of cameras or addons. Can you list which addons you’re running?

No cameras. As for addons, these are below. Is there a quick way to check the memory taken by each add-on?

addons:

  • icon: true
    name: Let’s Encrypt
    repository: core
    slug: core_letsencrypt
    state: stopped
    update_available: false
    version: 5.4.9
    version_latest: 5.4.9
  • icon: true
    name: Z-Wave JS UI
    repository: a0d7b954
    slug: a0d7b954_zwavejs2mqtt
    state: started
    update_available: false
    version: 5.1.0
    version_latest: 5.1.0
  • icon: false
    name: Assist Microphone
    repository: core
    slug: core_assist_microphone
    state: started
    update_available: false
    version: 1.3.0
    version_latest: 1.3.0
  • icon: true
    name: Advanced SSH & Web Terminal
    repository: a0d7b954
    slug: a0d7b954_ssh
    state: started
    update_available: false
    version: 21.0.2
    version_latest: 21.0.2
  • icon: true
    name: Matter Server
    repository: core
    slug: core_matter_server
    state: error
    update_available: false
    version: 8.1.0
    version_latest: 8.1.0
  • icon: true
    name: File editor
    repository: core
    slug: core_configurator
    state: started
    update_available: false
    version: 5.8.0
    version_latest: 5.8.0
  • icon: true
    name: Piper
    repository: core
    slug: core_piper
    state: started
    update_available: false
    version: 1.6.4
    version_latest: 1.6.4
  • icon: true
    name: Whisper
    repository: core
    slug: core_whisper
    state: started
    update_available: false
    version: 2.6.0
    version_latest: 2.6.0
  • icon: false
    name: openWakeWord
    repository: core
    slug: core_openwakeword
    state: started
    update_available: false
    version: 1.10.0
    version_latest: 1.10.0
  • icon: true
    name: deCONZ
    repository: core
    slug: core_deconz
    state: unknown
    update_available: false
    version: 8.2.0
    version_latest: 8.2.0
  • icon: true
    name: NGINX Home Assistant SSL proxy
    repository: core
    slug: core_nginx_proxy
    state: started
    update_available: false
    version: 3.13.0
    version_latest: 3.13.0
  • icon: true
    name: Grafana
    repository: a0d7b954
    slug: a0d7b954_grafana
    state: started
    update_available: false
    version: 11.0.0
    version_latest: 11.0.0
  • icon: true
    name: Node-RED
    repository: a0d7b954
    slug: a0d7b954_nodered
    state: unknown
    update_available: false
    version: 20.0.0
    version_latest: 20.0.0
  • icon: true
    name: JupyterLab
    repository: a0d7b954
    slug: a0d7b954_jupyterlablite
    state: started
    update_available: false
    version: 0.15.12
    version_latest: 0.15.12
  • icon: true
    name: AppDaemon
    repository: a0d7b954
    slug: a0d7b954_appdaemon
    state: started
    update_available: false
    version: 0.17.8
    version_latest: 0.17.8
  • icon: true
    name: OpenThread Border Router
    repository: core
    slug: core_openthread_border_router
    state: unknown
    update_available: false
    version: 2.13.0
    version_latest: 2.13.0
  • icon: true
    name: Duck DNS
    repository: core
    slug: core_duckdns
    state: started
    update_available: false
    version: 1.26.0
    version_latest: 1.26.0
  • icon: true
    name: ESPHome Device Builder
    repository: 5c53de3b
    slug: 5c53de3b_esphome
    state: started
    update_available: false
    version: 2025.8.2
    version_latest: 2025.8.2
  • icon: true
    name: Mosquitto broker
    repository: core
    slug: core_mosquitto
    state: started
    update_available: false
    version: 6.5.1
    version_latest: 6.5.1
  • icon: true
    name: Tailscale
    repository: a0d7b954
    slug: a0d7b954_tailscale
    state: started
    update_available: false
    version: 0.25.0
    version_latest: 0.25.0
  • icon: true
    name: Spotify Connect
    repository: a0d7b954
    slug: a0d7b954_spotify
    state: stopped
    update_available: false
    version: 0.15.0
    version_latest: 0.15.0
  • icon: true
    name: Z-Wave JS
    repository: core
    slug: core_zwave_js
    state: unknown
    update_available: false
    version: 0.22.0
    version_latest: 0.22.0
  • icon: true
    name: Uptime Kuma
    repository: a0d7b954
    slug: a0d7b954_uptime-kuma
    state: started
    update_available: false
    version: 0.14.0
    version_latest: 0.14.0

This is the error I see just before the last restart of HA core:

2025-09-01 12:06:30.990 ERROR (MainThread) [homeassistant] Error doing job: Fatal write error on serial transport (None)
Traceback (most recent call last):
File “/usr/local/lib/python3.13/site-packages/serial/serialposix.py”, line 621, in write
n = os.write(self.fd, d)
OSError: [Errno 5] I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.13/site-packages/serial_asyncio_fast/init.py”, line 307, in _write_data
n = self._serial.write(data)
File “/usr/local/lib/python3.13/site-packages/serial/serialposix.py”, line 655, in write
raise SerialException(‘write failed: {}’.format(e))
serial.serialutil.SerialException: write failed: [Errno 5] I/O error
s6-rc: info: service legacy-services: stopping

I was gonna tell you to check if you had anything plugged into USB. That uses Serial communication (your error above).

I’m assuming you’re using a USB dongle for Matter, because I also see the addon is erroring out.

icon: true
name: Matter Server
repository: core
slug: core_matter_server
state: error                   <---------- here's your clue
update_available: false
version: 8.1.0
version_latest: 8.1.0

In addition to the above, you’re running a bunch of voice-related addons (Assist microphone, Whisper, Piper & openWakeWord). Even assuming you don’t have the errors above, I seriously doubt 4GB is enough to run voice.

Yes, every Addon page will show you how much CPU and RAM it’s using

Thanks, in the meantime I found Whisper was taking 40% CPU.

I switched that off and ha has stopped rebooting. It is also much more responsive.

The matter server was stopping at restart. I switched it off, since so far it all runs on zwave and zigbee. The inverter and battery system that I will soon plug in are Bluetooth I think.

It would be nice though if home assistant had a simple panel where we could see resource utilization, broken down by addon and integration if possible. Even finding when it had last rebooted was not out of the box…

You have 2 options:

  1. Install System Monitor integration. This won’t give you a detailed breakdown, but at least it will give you a general overview of resources across your entire HA install.
  2. Wait for tomorrow’s release. I don’t really follow the betas, but I seem to recall some improvements are going to be made in visualising resource consumption.

PS. You replied to your own post. If you intended to reply to me you need to hit the Reply button underneath my post so I’ll get a notification. I came across your reply just by coincidence as I was browsing the forums.

Thanks, I installed the latest release. I had the System Monitor integration running. Now I enabled common sensors like cpu.

90% cpu in use, managed to find one add-on needed restarting. Now 40% and none of the addons seem to be using much. Memory seems to be round 40%, with the 8Gb giving some plenty of room.

Is the CPU usage of the core monitorable, like for add-ons?

Considering the addons you’re running (and probably their respective integrations), that doesn’t sound too bad.

Yes. Go to Settings > Devices & services > Devices tab and search for “Home Assistant Core”. Click on the “device” & enable the disabled CPU & Memory sensors

You can repeat the above steps to enable the Supervisor CPU usage sensor too, just search for "Home Assistant Supervisor " in the Devices page.

1 Like

WRT RAM you can add a 4GB minimum swap and HA will be just fine on even 1GB of memory. I added swap space even though I have a device that has 4GB RAM. Mainly because the Linux kernel uses swap to assist in its own memory maintenance. You should generally favor at least some swap space as a practice due to how modern Linux kernel utilizes it. Even in cloud systems.

I have been operating HA for a little over a year now and with its data stats collected from sensors it is taking up about 52GB of disk space.

I do not agree with this statement. I do agree it doesn’t need a ton. But a blanket 1g is fine is simply untrue… in my install… 2.5 g at a MINIMUM or I will crash within 40 min from memory pressure issues. I find this is driven by the number of entities in the state engine. (I have a ton.)

You can only swap out memory that is not used to a swap file/partition, and generally more swap than real memory is not advised, because you can end in a situation where you do not have space to swap it in again.

1 Like

Starting out, I had no issues with 1GB and 4GB swap. I guess ymmv but I wouldn’t personally make the blanket statement that HA cannot run on lower end hardware as an intro to the smart home. It absolutely depends on how you use it. Like it’s not going to record your video feeds but it can definitely handle lights, doors, hydrometers and water leak sensors which IMO is over 90% of (if not all of) intro smart home owners’ needs. Everything else is hobbyists extras. In which case, sure migrate to new hardware as your needs grow.

I have a mix of z-wave and bluetooth (no BT relays) and formerly some wifi connected plugs but those have since been removed from my home.

Running this configuration when supervised was generally supported was easy and was my first hardware (basic debian, low spec hardware with swap).

If you’re running HAOS then you’re at the mercy of whatever HAOS is so pricier hardware is a requirement (pricier is relative ofc; a few hundred dollars is what I am calling pricier as opposed to less than $50 for hardware).

I even ran wireguard with it using a split VPN to maintain connectivity to home (but only routing DNS and connections directly to HA). Was not able to handle full VPN.

In this scenario:

  • Don’t use HACS
  • Minimize addons; like even now I only rely on 3 addons (5 if you count basic voice assistance which you wouldn’t use on 1GB RAM system anyways). And if I were to remove Adguard I could get it down to 2 addons minimum for my home.

Edit side note: I am currently running HA with 4GB RAM and 4GB swap I have 58 devices providing 510 entities running fine. Average 5% or less CPU usage and 1.5GB of memory usage overall in this config.

Thanks, managed to find the (final?) culprit: appdeamon taking 45% CPU while not doing anything, so now off. Core is now using up to 30% memory and 5% cpu, with spikes usually below 30%. :smile:

It may help folks if in future the cpu and memory sensors would be enabled by default…

2 Likes