0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

feat: Set keepalive to 60 on gunicorn (#17897)

Set keepalive to 60 on gunicorn

The default is 2 seconds, the default for ALBs is 30 seconds

This can cause a race condition where gunicorn closes the connection
as the ALB sends a request, resulting in a 502.
This commit is contained in:
Frank Hamand 2023-10-11 08:54:48 +01:00 committed by GitHub
parent b4971706b2
commit 7a14421e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ exec gunicorn posthog.wsgi \
--worker-tmp-dir /dev/shm \
--workers=2 \
--threads=8 \
--keep-alive=60 \
--backlog=${GUNICORN_BACKLOG:-1000} \
--worker-class=gthread \
${STATSD_HOST:+--statsd-host $STATSD_HOST:$STATSD_PORT} \