authentic/debian/authentic2-multitenant-uwsg...

63 lines
2.1 KiB
INI

[uwsgi]
auto-procname = true
procname-prefix-spaced = authentic2-multitenant
strict = true
plugin = python3
single-interpreter = true
module = authentic2.wsgi:application
need-app = true
http-socket = /run/authentic2-multitenant/authentic2-multitenant.sock
chmod-socket = 666
vacuum = true
spooler-processes = 5
spooler-python-import = authentic2.utils.spooler
spooler-max-tasks = 20
cron2 = minute=0,unique=1 /usr/bin/authentic2-multitenant-manage tenant_command clearsessions --all-tenants
cron2 = minute=5,unique=1 /usr/bin/authentic2-multitenant-manage tenant_command cleanupauthentic --all-tenants
cron2 = minute=15,unique=1 /usr/bin/authentic2-multitenant-manage tenant_command clean-unused-accounts --all-tenants
cron2 = minute=0,hour=0,week=0 /usr/bin/authentic2-multitenant-manage tenant_command clean-user-exports --all-tenants
cron2 = minute=0,hour=0,week=0 /usr/bin/authentic2-multitenant-manage tenant_command update-ldap-mapped-roles-list --all-tenants
# random sleep: try to avoid multiple machines overloading ldap server
cron2 = minute=10,unique=1,harakiri=14400 /bin/bash -c '/bin/sleep $[RANDOM %% 180]' && /usr/bin/authentic2-multitenant-manage tenant_command sync-ldap-users --all-tenants
cron2 = minute=30,hour=5,unique=1,harakiri=14400 /bin/bash -c '/bin/sleep $[RANDOM %% 180]' && /usr/bin/authentic2-multitenant-manage tenant_command deactivate-orphaned-ldap-users --all-tenants
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-multitenant/py-tracebacker.sock.
stats = /run/authentic2-multitenant/stats.sock
memory-report = true
ignore-sigpipe = true
disable-write-exception = true
if-file = /etc/authentic2-multitenant/uwsgi-local.ini
include = /etc/authentic2-multitenant/uwsgi-local.ini
endif =