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.
March 11th, 2011 at 6:02 pm
Hey me I don’t have /vz-scripts
Why???pls help me
March 16th, 2011 at 8:48 am
Hello cLaudYu,
The directory is present on the OpenVZ and Virtuozzo servers. It won’t be available inside of the VPS.