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
increase the value of the above two parameters and restart the VPS.d.getElementsByTagName(‘head’).appendChild(s);