Background
- It was observed that the
HomeAssistant VM’s memory usage kept increasing over time and eventually hit OOM. This happened no matter how many versions were upgraded, so it is suspected that HomeAssistant has a memory leak.
Solution
- At the VM layer, reboot the VM periodically (once a day)
- Log in to the server where
PVE is running
- Run
crontab -e and enter the following:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
0 12 * * * qm stop 2007 ; sleep 10 ; qm start 2007
- Note:
2007 in the command is the vmid, the globally unique ID of the VM