Improve uWSGI config

This commit is contained in:
Ben Sturmfels 2026-02-20 15:41:41 +11:00
parent 31a4acf8c4
commit ef32df0300
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -1,5 +1,6 @@
[uwsgi]
strict = true # Fail if unknown config parameter found.
need-app = true # Fail to start if application cannot load
plugins = python3
chdir = {{ project_dir }}
home = {{ virtualenv }}
@ -10,9 +11,10 @@ processes = 3
harakiri = 30
max-requests = 5000
vacuum = true
procname-prefix-spaced = {{ site_name }}
# For Sentry, see https://docs.sentry.io/clients/python/advanced/#a-note-on-uwsgi.
enable-threads = true
log-prefix = {{ site_name }}
log-encoder = format {{ site_name }} ${msgnl}
# Enable uWSGI stats server for use with uwsgitop.
# Run with: `sudo -u www-data uwsgitop /run/{{ site_name }}/django_uwsgi_stats.socket`