From cf5e70c759dbd4d8f65c6cfe7f87f5f6f90a6444 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 4 Nov 2021 13:16:10 +0100 Subject: [PATCH] lifecycle: revert to non-h11 worker Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 2 ++ lifecycle/gunicorn.conf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 91b017511..8d91a83b1 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -13,6 +13,7 @@ from django.db import InternalError, OperationalError, ProgrammingError from django.http.response import Http404 from django_redis.exceptions import ConnectionInterrupted from docker.errors import DockerException +from h11 import LocalProtocolError from ldap3.core.exceptions import LDAPException from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import RedisError, ResponseError @@ -72,6 +73,7 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: # websocket errors ChannelFull, WebSocketException, + LocalProtocolError, # rest_framework error APIException, # celery errors diff --git a/lifecycle/gunicorn.conf.py b/lifecycle/gunicorn.conf.py index 1721d9597..ac29c8230 100644 --- a/lifecycle/gunicorn.conf.py +++ b/lifecycle/gunicorn.conf.py @@ -16,7 +16,7 @@ try: except KeyError: pass -worker_class = "uvicorn.workers.UvicornH11Worker" +worker_class = "uvicorn.workers.UvicornWorker" # Docker containers don't have /tmp as tmpfs if os.path.exists("/dev/shm"): # nosec worker_tmp_dir = "/dev/shm" # nosec