Ubuntu10.4 Nginx + Wordpress is working only short time and found Cannot allocate memory

Posted April 19, 2014 4.1k views
Hi I tried to install Ubuntu10.4 Nginx + Wordpress and I can load my site just only a short time and got message on Firefox browser "The page you are looking for is temporarily unavailable. Please try again later. " Then I went back to ssh terminal and trying to check if nginx is running, I found "-bash: fork: Cannot allocate memory" and whenever I use any command, I found the same message -bash: fork: Cannot allocate memory then shortly after, It will work again, then after loading a few pages then it lost connection again. Please help I tried so many times , I followed many configurations from digital ocean but not succeed.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
Your droplet probably run out of memory. Can you post us the results of the following commands?
free -h
ulimit -a
Hi Sianinos,

Thank you for your reply.
Here's what I found

> free -l

total used free shared buffers cached
Mem: 1018820 860364 158456 0 34508 142884
Low: 1018820 860364 158456
High: 0 0 0
-/+ buffers/cache: 682972 335848
Swap: 0 0 0

> unlimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7813
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 7813
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I'm just curious why I got so less memory on this line
Mem: 1018820 860364 158456 0 34508 142884

It said free memory left just 158456


Please help

What size droplet are you using? Could you describe your Wordpress set up a little? Do you have a large number of plugins installed?

You might want to consider moving to a larger droplet.