Unable to fork: Cannot allocate memory

You see a message Unable to fork: Cannot allocate memory” while logging to a VPS from the host server. The reason is the VPS is running out of resources especially RAM. To temporary solve the issue, you may restart the VPS by executing

vzctl restart VEID

OR increase RAM for the VPS by increasing privvmpages and kmemsize for the VPS.

Edit the configuration file of the VPS

vi /etc/sysconfig/vz-scripts/veid.conf

increase the value of the above two parameters and restart the VPS.

This entry was posted on Sunday, September 27th, 2009 and is filed under VPS Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

2 Responses to “Unable to fork: Cannot allocate memory”

  1. cLaudYu

    Hey me I don’t have /vz-scripts
    Why???pls help me

  2. admin

    Hello cLaudYu,

    The directory is present on the OpenVZ and Virtuozzo servers. It won’t be available inside of the VPS.