run-uwsgi.sh 1005 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env sh
  2. set -e
  3. UWSGI_LISTEN="${UWSGI_LISTEN:-128}"
  4. PORT="${PORT:-8000}"
  5. CHEAPER_OVERLOAD="${UWSGI_CHEAPER_OVERLOAD:-30}"
  6. MAX_REQUESTS="${UWSGI_MAX_REQUESTS:-10000}"
  7. WORKER_RELOAD_MERCY="${UWSGI_WORKER_RELOAD_MERCY:-10}"
  8. exec uwsgi \
  9. --module=glitchtip.wsgi:application \
  10. --env DJANGO_SETTINGS_MODULE=glitchtip.settings \
  11. --master --pidfile=/tmp/project-master.pid \
  12. --log-x-forwarded-for \
  13. --log-format-strftime \
  14. --http-socket=:$PORT \
  15. --cheaper-algo=busyness \
  16. --cheaper-overload=$CHEAPER_OVERLOAD \
  17. --cheaper-step=1 \
  18. --cheaper-busyness-max=50 \
  19. --cheaper-busyness-min=25 \
  20. --cheaper-busyness-multiplier=20 \
  21. --harakiri=60 \
  22. --max-requests=$MAX_REQUESTS \
  23. --worker-reload-mercy=$WORKER_RELOAD_MERCY \
  24. --die-on-term \
  25. --enable-threads \
  26. --single-interpreter \
  27. --post-buffering \
  28. --buffer-size=83146 \
  29. --ignore-sigpipe \
  30. --ignore-write-errors \
  31. --disable-write-exception \
  32. --listen=$UWSGI_LISTEN