Skip to content

Commit

Permalink
feat: utilize gunicorn threads
Browse files Browse the repository at this point in the history
This reduces memory usage and improves performance.
  • Loading branch information
nijel committed Dec 4, 2024
1 parent 589e769 commit aae2514
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion etc/supervisor/conf.d/web.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ command = /app/venv/bin/gunicorn
--graceful-timeout 3600
--max-requests 7000
--max-requests-jitter 1000
--workers=%(ENV_WEB_WORKERS)s
--workers=2
--threads=%(ENV_WEB_WORKERS)s
--access-logfile='-'
--error-logfile='-'
--forwarded-allow-ips="*"
Expand Down
2 changes: 1 addition & 1 deletion start
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ set_real_ip_from 0.0.0.0/0;
: "${CELERY_BACKUP_OPTIONS:="--concurrency 1"}"
: "${CELERY_BEAT_OPTIONS:=""}"
: "${CELERY_SINGLE_OPTIONS:="--concurrency $WEBLATE_WORKERS"}"
: "${WEB_WORKERS:="$((WEBLATE_WORKERS + 1))"}"
: "${WEB_WORKERS:="$WEBLATE_WORKERS"}"
# This is for legacy configurations, should be removed in the future
if [ -n "$UWSGI_WORKERS" ] ; then
echo "Configuration using UWSGI_WORKERS is deprecated, please use WEB_WORKERS instead!"
Expand Down

0 comments on commit aae2514

Please sign in to comment.