title: error: 502 bad gateway in flask app on nginx and uwsgi
body: <p>I am deploying a flask app on Ubuntu server using Nginix, uWSGI. I followed this tutorial... <a href="http://www.soundrenalin.com/about" rel="nofollow">http://www.soundrenalin.com/about</a></p>
  
  <p>I am beginner in Nignix and Sys Admin.</p>
  
  <p>But when i run my app it gives error: <code>502 Bad Gateway</code></p>
  
  <p>I looked into log file and it says:</p>
  
  <pre><code>Starting uWSGI 1.2.3-debian (32bit) on [Sun May 19 05:39:19 2013] 
  ***compiled with version: 4.7.1 on 17 September 2012 17:20:40 detected number of CPU cores: 1 current working directory: /etc/uwsgi/apps-enabled detected binary path: /usr/bin/uwsgi-core your memory page size is 4096 bytes detected max file descriptor number: 1024
  lock engine: pthread robust mutexesunlink(): Operation not permitted [socket.c line 75]
  bind(): Address already in use [socket.c line 107] removed uwsgi instance flaskapp.ini
  </code></pre>
  
  <p>Why this is happening? Please Suggest</p>