diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 707fd9c10..fc17f16aa 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -347,6 +347,7 @@ LOCALE_PATHS = ["./locale"] # Celery settings # Add a 10 minute timeout to all Celery tasks. CELERY_TASK_SOFT_TIME_LIMIT = 600 +CELERY_WORKER_MAX_TASKS_PER_CHILD = 50 CELERY_BEAT_SCHEDULE = { "clean_expired_models": { "task": "authentik.core.tasks.clean_expired_models", diff --git a/lifecycle/gunicorn.conf.py b/lifecycle/gunicorn.conf.py index f2de67276..3f36d5e31 100644 --- a/lifecycle/gunicorn.conf.py +++ b/lifecycle/gunicorn.conf.py @@ -23,6 +23,9 @@ if os.path.exists("/dev/shm"): # nosec os.environ.setdefault("DJANGO_SETTINGS_MODULE", "authentik.root.settings") +max_requests = 1000 +max_requests_jitter = 50 + logconfig_dict = { "version": 1, "disable_existing_loggers": False,