[uwsgi]
auto-procname = true
procname-prefix-spaced = authentic2
strict = true

plugin = python3
single-interpreter = true
module = authentic2.wsgi:application
need-app = true

http-socket = /run/authentic2/authentic2.sock
chmod-socket = 666
vacuum = true

spooler-processes = 3
spooler-python-import = authentic2.utils.spooler
spooler-max-tasks = 20

cron2 = minute=0,unique=1 /usr/bin/authentic2-manage clearsessions
cron2 = minute=5,unique=1 /usr/bin/authentic2-manage cleanupauthentic
cron2 = minute=0,hour=5,unique=1 /usr/bin/authentic2-manage clean-unused-accounts
cron2 = minute=0,hour=0,week=0,unique=1 /usr/bin/authentic2-manage clean-user-exports
cron2 = minute=10,unique=1,harakiri=14400 /usr/bin/authentic2-manage sync-ldap-users
cron2 = minute=20,unique=1,harakiri=14400 /usr/bin/authentic2-manage oidc-refresh-jwkset-json
cron2 = minute=30,hour=5,unique=1,harakiri=14400 /usr/bin/authentic2-manage deactivate-orphaned-ldap-users

master = true
enable-threads = true
harakiri = 120

processes = 500

plugin = cheaper_busyness
cheaper-algo = busyness
cheaper = 5
cheaper-initial = 10
cheaper-overload = 20
cheaper-step = 2
cheaper-busyness-multiplier = 10
cheaper-busyness-min = 20
cheaper-busyness-max = 70
cheaper-busyness-backlog-alert = 16
cheaper-busyness-backlog-step = 2

listen = 1024

max-requests = 500
max-worker-lifetime = 7200

buffer-size = 32768

py-tracebacker = /run/authentic2/py-tracebacker.sock.
stats = /run/authentic2/stats.sock
memory-report = true

ignore-sigpipe = true
disable-write-exception = true

if-file = /etc/authentic2/uwsgi-local.ini
  include = /etc/authentic2/uwsgi-local.ini
endif =
