File tree Expand file tree Collapse file tree 4 files changed +16
-19
lines changed
Expand file tree Collapse file tree 4 files changed +16
-19
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ server {
7676
7777{% if WEBLATE_ANUBIS_URL %}
7878 location ~ ^{{ WEBLATE_URL_PREFIX }}(/widget/| /exports/rss/| /healthz/| /hooks/| /accounts/complete/) {
79- proxy_pass http://unix:/run/gunicorn/app/ weblate/ socket;
79+ proxy_pass http://unix:/run/granian/ weblate. socket ;
8080 }
8181{% endif %}
8282
@@ -85,7 +85,7 @@ server {
8585 auth_request /.within.website /x/cmd/anubis/api/check;
8686 error_page 401 = @redirectToAnubis;
8787{% endif %}
88- proxy_pass http://unix:/run/gunicorn/app/ weblate/ socket;
88+ proxy_pass http://unix:/run/granian/ weblate. socket ;
8989 }
9090}
9191
Original file line number Diff line number Diff line change 1- [program:gunicorn]
2- command = /app/venv/bin/gunicorn
1+ [program:granian]
2+ command = /app/venv/bin/granian
3+ --no-ws
4+ --workers-max-rss 350
5+ --runtime-mode mt
6+ --interface wsgi
7+ --workers 2
8+ --backpressure %(ENV_WEB_WORKERS)s
9+ --runtime-threads %(ENV_WEB_RUNTIME_THREADS)s \
10+ --uds /run/granian/weblate.socket
311 weblate.wsgi:application
4- --preload
5- --timeout 3600
6- --graceful-timeout 3600
7- --max-requests 7000
8- --max-requests-jitter 1000
9- --workers=2
10- --threads=%(ENV_WEB_WORKERS)s
11- --access-logfile='-'
12- --error-logfile='-'
13- --forwarded-allow-ips="*"
14- --bind unix:///run/gunicorn/app/weblate/socket
1512stdout_logfile=/dev/fd/1
1613stdout_logfile_maxbytes=0
1714redirect_stderr=true
1815autorestart = true
1916
20-
2117[program:nginx]
2218command = /usr/sbin/nginx -g "daemon off;"
2319stdout_logfile=/dev/fd/1
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ djangorestframework==3.16.0
2626gevent == 25.5.1
2727git-review == 2.5.0
2828google-cloud-translate == 3.21.1
29- gunicorn == 23.0 .0
29+ granian == 2.5 .0
3030hiredis == 3.2.1
3131html2text == 2025.4.15
3232iniparse == 0.5
Original file line number Diff line number Diff line change @@ -253,8 +253,8 @@ if [ "$1" = "runserver" ]; then
253253 # Compress js and css
254254 run_weblate compress --force --traceback
255255
256- # uswgi dir
257- mkdir -p /run/gunicorn/app/weblate
256+ # wsgi socket dir
257+ mkdir -p /run/granian/
258258
259259 # Celery pid, remove possible stale PID file
260260 mkdir -p /run/celery
@@ -308,6 +308,7 @@ set_real_ip_from 0.0.0.0/0;
308308 : " ${CELERY_BEAT_OPTIONS:= " " } "
309309 : " ${CELERY_SINGLE_OPTIONS:= " --concurrency $WEBLATE_WORKERS " } "
310310 : " ${WEB_WORKERS:= " $WEBLATE_WORKERS " } "
311+ : " ${WEB_RUNTIME_THREADS:= " $(( WEB_WORKERS / 2 )) " } "
311312 # This is for legacy configurations, should be removed in the future
312313 if [ -n " $UWSGI_WORKERS " ]; then
313314 echo " Configuration using UWSGI_WORKERS is deprecated, please use WEB_WORKERS instead!"
You can’t perform that action at this time.
0 commit comments