title: Nginx, unable to fork: Cannot allocate memory
body: <p>I'm trying to follow the tutorial at <a href="http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html" rel="nofollow">http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html</a>. I am working with an ubuntu 14.4 instance on amazon EC2. I've got everything working OK in testing, however after putting my django app online, I noticed that the server was returning:</p>
  
  <pre><code> HTTP/1.1 503 Service Unavailable
  </code></pre>
  
  <p>When I logged into my ubuntu EC2 instance, I restarted uwsgi and nginx and got:</p>
  
  <pre><code> ubuntu@ip-172-31-28-196:~$ workon env1 
   (env1)ubuntu@ip-172-31-28-196:~$ uwsgi --ini /home/ubuntu/tproxy/tp/mysite_uwsgi.ini --daemonize=/var/log/yourproject.log
   [uWSGI] getting INI configuration from /home/ubuntu/tproxy/tp/mysite_uwsgi.ini
   (env1)ubuntu@ip-172-31-28-196:~$ sudo /etc/init.d/nginx restart /tp/m
   sudo: unable to fork: Cannot allocate memory
  </code></pre>
  
  <p>What is going wrong? How can I fix this?</p>
  
  <p>edit:</p>
  
  <pre><code>(env1)ubuntu@ip-172-31-28-196:~$ free -h
               total       used       free     shared    buffers     cached
  Mem:          992M       192M       799M       360K        37M        75M
  -/+ buffers/cache:        79M       913M
  Swap:           0B         0B         0B
  
  (env1)ubuntu@ip-172-31-28-196:~$ uname -a
  Linux ip-172-31-28-196 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x
  86_64 GNU/Linux
  </code></pre>