Skip to content

Commit

Permalink
Set max-requests and max-requests-jitter
Browse files Browse the repository at this point in the history
We think we have a memory leak and setting max-requests will hopefully    mitigate
this. Also set max-requests-jitter so that the workers don't all restart  at the
same time.

2000 and 200 are numbers picked from looking at production traffic.
  • Loading branch information
rjw1 committed Jan 8, 2025
1 parent f83be44 commit f3d3d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compose/production/django/start
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ set -o nounset
npm run build
python /app/manage.py collectstatic --noinput
cd /app
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app --access-logfile - -w 5 --access-logformat '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(L)s "%({x-forwarded-for}i)s" "%({cloudfront-viewer-address}i)s" "%({x-amz-cf-id}i)s" "%({x-amzn-trace-id}i)s"'
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app --access-logfile - -w 5 --access-logformat '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(L)s "%({x-forwarded-for}i)s" "%({cloudfront-viewer-address}i)s" "%({x-amz-cf-id}i)s" "%({x-amzn-trace-id}i)s"' --max-requests 2000 --max-requests-jitter 200

0 comments on commit f3d3d14

Please sign in to comment.