<uwsgi>
  <socket>/var/run/uwsgi/$SITE_NAME-stage.sock</socket>
  <chown-socket>www-data</chown-socket>
  <uid>www-data</uid>
  <gid>www-data</gid>
  <master/>
  <daemonize>/var/log/uwsgi/$SITE_NAME-stage.log</daemonize>
  <max-requests>5000</max-requests>

  <!-- max seconds an app will after its being killed -->
  <harakiri>120</harakiri>

  <!-- restart the server after x seconds of inactivity -->
  <inactivity>300</inactivity>

  <!-- name of wsgi app file -->
  <module>django_wsgi</module>

  <!-- reload server after touching that file -->
  <touch-reload>/home/notch/sites/$SITE_NAME-stage/uwsgi/stage/django_wsgi.py</touch-reload>

  <!-- setup python environment -->
  <autoload/>
  <plugins>python</plugins>
  <pythonpath>/home/notch/sites/$SITE_NAME-stage</pythonpath>
  <pythonpath>/home/notch/sites/$SITE_NAME-stage/uwsgi/stage</pythonpath>
  <pythonpath>/home/notch/virtualenvs/$SITE_NAME-stage/lib/python$PYTHON_VERSION/site-packages</pythonpath>

  <!-- use virtualenv -->
  <pyhome>/home/notch/virtualenvs/$SITE_NAME/</pyhome>


  <!-- Number of processes. Set this to number of cpus not cores -->
  <processes>1</processes>

  <!-- number of threads. Set this to the total number of cores -->
  <enable-threads/>
  <threads>4</threads>
</uwsgi>
