Unable to fork: Cannot allocate memory

mccharlet

Renowned Member
Jul 7, 2009
44
0
71
I have this error when execute

vzctl enter 201

Only a hard reboot the host resolve my problem

I have 2go memory on my host and i have two vm with 512Mo Ram et 256Mo Swap

Swap is not used on my host !!!!

Thanks for your help
 
Last edited:
That's typical OpenVZ. You have not allocated enough of memory for your Virtual Machine (VM). The rule of thumb is that you can allocate ALL your memory for ONE of your VM. Then do that to ALL your VM's on that same host. That way OpenVZ's won't run out of memory easily and only slow down if lots of memory/swap is being used. (The allocation of Swap is automatic in ProxMox.)
 
it is not typical
type vzlist and check NPROC

CTID NPROC STATUS IP_ADDR HOSTNAME
101 261 running 62.xx.xx.237 hostname

If you have it 1024 or near you need to increase it

vzctl set 101 --numproc 8192:8192 --save

values can be less or bigger as you need
 
It is typical error when VZ container does not have enough memory, just restart container, go in it and do this:
Code:
wget http://download.openvz.org/contrib/utils/vzcheck.sh
chmod 755  vzcheck.sh ; ./vzcheck.sh
Sometimes container runs out of disk space and some processes start eating ram, so check disk space limits too. If everything checks out okay, then you have to check hosts hardware for bad ram, bad hard drive, fans/overheating and etc.
 
I always check beancounters with vzcheck script, and for me non-typical situations are when hosts hardware goes bad or file system gets corrupted from unexpected power outage...
 
Last edited by a moderator:
We all have non-typical VM's :)
In my situation it is web server with static pages but with many-many connects
 
That makes sense, I did have non-typical loads too, have to control those ... :)
 
Thanks,

I have execute vzcheck

I have this

vzctl set 201: --privvmpages 216268:230018 --save
#201: privvmpages: used: 164K:194K lim: 192K:204K !!! FIXME(1K)

I have execute
vzctl set 201 --privvmpages 216268:230018 --save

Now a have this
#201: privvmpages: used: 78K:194K lim: 211K:225K -- FIXED(1K)

How to resolve this ?

Thanks
 
No, it says also "FIXME".. please what to do?

vzctl set 201: --privvmpages 216268:230018 --save
#201: privvmpages: used: 164K:194K lim: 192K:204K !!! FIXME(1K)
 
It is typical error when VZ container does not have enough memory, just restart container, go in it and do this:
Code:
wget http://download.openvz.org/contrib/utils/vzcheck.sh
chmod 755  vzcheck.sh ; ./vzcheck.sh
Sometimes container runs out of disk space and some processes start eating ram, so check disk space limits too. If everything checks out okay, then you have to check hosts hardware for bad ram, bad hard drive, fans/overheating and etc.

Hi, i got this when running vzcheck.sh:

vzctl set 320 --privvmpages 72089:72089 --save
#320 privvmpages: used: 43K:65K lim: 64K:64K !!! FIXME(56G)

please how is this caused?

this 320 VM has also Unable to fork: Cannot allocate memory
 

About

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!