Help Debugging: Plex server keeps crashing and then "Cannot allocate memory"


New Member
Nov 25, 2019
Hi! I just setup Proxmox for my home server last week.

Here is my setup with relevant info before I jump into the problem
Note: everything is isolated because I've been trying to debug for the past week.
Computer: 16gb memory
VM for Plex: 4gb memory
VM for NZBGet+Sonarr+Radarr: 4gb memory
VM for Samba: 1gb memory
Container for Ombi: 512mb memory

The Problem
About once a day, the Plex VM crashes. It is consistently the Plex VM and when I try to start it back up Proxmox will then say "Cannot allocate memory". Here's where it get's a bit weird. The last time this happend (just now) Proxmox said 13gb of 16gb were used, top on the host said similar (only 3gb free), but each of the VMs/container showed normal memory usage. This is making it very hard to debug/isolate the problem.

My Temporary Fix
I ran this command I found on reddit and the memory immediately freed up and I could start the VM:
free && sync && echo 3 > /proc/sys/vm/drop_caches && free

But I have no idea what that does :(

Here are some questions I think might help lead to the answer"

  • What are some ways I can monitor the machine and see exactly which processes/vms are taking up all the memory?
  • Could it possibly be a memory leak from something other than Plex? If so why would that be the VM that ALWAYS crashes?
    • Maybe there is a leak in my NZBGet+Sonarr+Radarr VM and Plex always crashes because it is the only other VM asking for 4gb?
I'd appreciate any help or advice in solving this mystery! Thanks :)

Is ZFS is used? If yes You should allocate memory usage for ZFS.

Also, for me I'm using LXC container for Plex (CentOS) and Samba Active Directory (Alpine Linux).

LXC memory allocation is not similliar as VM and I think if You will use lxc for Plex You won't have problem with available memory.


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!