Virtual Machine: Out of memory: Killed process 1017513 (python3)

The problem came back after a while. I tried everything, and ended up just giving up on running Home Assistant in a VM. None of the solutions I found worked. Running HA in a VM made Z-Wave, ZigBee, and Bluetooth a lot more complicated anyway.

Where are you running home assistant now?
For me is a daily problem now.

I am running it on a Raspberry PI 4; I have had random restarts since then but they seem to have stopped once I installed a cooling kit

I’m using a cheap mini PC that I got for $180, similar to an Intel NUC. The performance seems to be pretty good, and these days it’s not much more than a Raspberry Pi 4, but it’s more powerful.

The same is here with 2022.08. It crashes every 20 mins with 8Gb of RAM.

any solution to troubleshoot this.
for me this never was a problem until the 2022.12 release

I increased from 4GB to 6GM but I don;t think that will solve it.
There is obvious some memory leak here

Is this under investigation by the HA developers ?
I also have this issue for quite a long time and still couldn’t find anything that might lead to a memory leak. Looks indeed like it is in HA itself since the new 2022.12 version.
I now have an automation created to call for a service to reboot every day at night.

happens here too,since around then in time before i started noticing and have to reboot regularly i did swap the hyperv vm between two computers i thought it maybe hardware related and try to place it back, but now iam not sure

Hey guys,
I have actually the same problem. My ha instance is running for ~10 minutes, then i gets an error, see screenshot below:
My proxmox vm has 8vGB of RAM, 2xvCPU cores (host: AMD Ryzen 7 3700X) and 32 GB of vHDD
first i had 2022.12 version, today i upgraded to latest 2023.x version and error still appears.


What can i do to fix this error and get my HA back to life??

I have the same problem with HA 2022.12.6, Home Assistant OS 9.4 running inside a VBox VM. It seems that this could be some VirtualBox issue, as the HA itself is not using more memory. The day of startup:

HA
  VIRT    RES      %MEM
  1233.0m 428.6m   14.8   5:05.28 S python3 -m homeassistant --config /config                               

Host os
  VIRT    RES      %MEM
   3295452 600628  15,3   5:21.82 VBoxHeadless                                                     

and next day

HA
  VIRT    RES      %MEM
   1302.7m 434.9m   15.0  27:40.30 S python3 -m homeassistant --config /config                               

Host os
  VIRT    RES      %MEM
   3662040   2,0g   52,6 414:48.88 VBoxHeadless                                                     

At the same time free on the HA system shows plenty of free memory after I have cleared the caches:

# sync; echo 3 > /proc/sys/vm/drop_caches 
# free
               total        used        free      shared  buff/cache   available
Mem:         2969956      776272     1657556        4264      536128     2182948
Swap:         742488           0      742488

So a lot of free RAM, but VBox is for some reason not giving it back to the host. I will keep looking how this develops after I cleared the caches.

Hi Stephan,
How do you created the automation.

All the best
Johnnes

same issue here

What’s the max vRAM anyone has tried it with?

same issue here after restoring an Backup,
wich before runs in an VM (previous memory utilization in System->HW: 2GB RAM), but restored to an Raspberry Pi 4 4GB:
Backupsize:(3,8GB)

Out of memory: Killed process2641 (python3) total-vm: 4175392kB, anon-rss:1632764kB, file-rss:0kB, UID:0, pytables:5076kB oon_score_adj:-300

if i Restore it in a Proxmox VM with 10 GB of RAM i received:

now i can’t restore my Homeassistant on any hw…

does anyone have suggestions what i could try?

Hi

I’m still facing this issue, HA restarting every 10 mins. Did anyone solve this?

Same problem here as well!

Have you enabled shared and/or dynamic memory on your hypervisor, that my cause the issue that there is less memory then the operating system thinks it is and when reaching the upper end of the memory it runs out of memory. Try disabling these memory feature in the hypervisor and report back. Helped my with my QNAP Virtualisation Station installation.

I’m using HA as a VM in Proxmox… this error appeared today… it keeps rebooting every 15/20 minutes:

Any idea?

Do you have Glances running? I had an addon killing my memory (Python3) and it helped show me what was using it all

If you are running Alexa Media Player, please take a look at this: PSA: Alexa Media Player v4.13.3 breaks all versions of Home Assistant - Configuration - Home Assistant Community (home-assistant.io)