Home Linux Basics Unable to fork: Cannot allocate memory

Unable to fork: Cannot allocate memory

by Bella

Issue :

Receiving the below error while login to a container from OpenVZ node :

#vzctl enter 10524

Unable to fork: Cannot allocate memory

where ‘10524’ is the id of the container you are trying to login to.

Solution:

First check whether its an issue with the Node Memory :

# free -m

If not, it might be due to privvmpages limits.

Check the file /proc/user_beancounters which contains information about the resource control information of the different container.

# cat /proc/user_beancounters

Crosscheck the information about the container in that file.

If the ‘privvmpages’ value in the file shows exhausted, edit the parameter of ’privvmpages’ on configuration file of this container(eg. container 10524).

# vim /etc/sysconfig/vz-scripts/10524.conf

Edit the value of privvmpages to a higher value and restart the container.

# vzctl restart 10524

If you require help, contact SupportPRO Server Admin

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment