Skip to content

Commit bd320c0

Browse files
committed
fix: limit number of blocking threads
1 parent 3a107a5 commit bd320c0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

etc/supervisor/conf.d/web.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ command = /app/venv/bin/granian
66
--interface wsgi
77
--runtime-threads 2
88
--workers %(ENV_WEB_WORKERS)s
9+
--blocking-threads %(ENV_WEB_BLOCKING_THREADS)s
910
--host 127.0.0.1
1011
--port 8081
1112
%(ENV_GRANIAN_ARGS)s

start

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ set_real_ip_from 0.0.0.0/0;
309309
: "${CELERY_BEAT_OPTIONS:=""}"
310310
: "${CELERY_SINGLE_OPTIONS:=""}"
311311
: "${WEB_WORKERS:="$((WEBLATE_WORKERS <= 3 ? 2 : WEBLATE_WORKERS / 2))"}"
312+
: "${WEB_BLOCKING_THREADS:="$((WEBLATE_WORKERS * 2))"}"
312313
: "${GRANIAN_ARGS:=""}"
313314

314315
export CELERY_MAIN_OPTIONS
@@ -319,7 +320,7 @@ set_real_ip_from 0.0.0.0/0;
319320
export CELERY_BEAT_OPTIONS
320321
export CELERY_SINGLE_OPTIONS
321322
export WEB_WORKERS
322-
export WEB_RUNTIME_THREADS
323+
export WEB_BLOCKING_THREADS
323324
export GRANIAN_ARGS
324325

325326
# Execute supervisor

0 commit comments

Comments
 (0)