I’m using Ubuntu 14.04. Recently, when I login via SSH with my user with sudo privileges, every command I run results in a “Cannot allocate memory” error. Here are a few I tried at my console
myuser@mymachine:~$ whoami
-bash: fork: Cannot allocate memory
myuser@mymachine:~$ uname -a
-bash: fork: Cannot allocate memory
Even if I try sudo reboot now
I get the above error, so I don’t know what else I can try to unlock my instance. The host is DigitalOcean if that matters.
Edit: Per the answer/suggestion given here is the output of "free"
myuser@mymachine:~$ free
-bash: fork: Cannot allocate memory