From 91ff88a0089857a310c10c84a1ecca9d92e16589 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 10 Jan 2026 14:24:31 -0500 Subject: [PATCH 1/3] Add WEB_SERVER_GUNICORN_RETRIES env var for slow systems --- docker/init_scripts/init | 5 +++-- env.template | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/init_scripts/init b/docker/init_scripts/init index 94fbf3b18..37279ca0a 100755 --- a/docker/init_scripts/init +++ b/docker/init_scripts/init @@ -72,7 +72,8 @@ run_startup() { wait_for_gunicorn_socket() { debug_log "Waiting for gunicorn socket file..." - local retries=60 + local retries=${WEB_SERVER_GUNICORN_RETRIES:=60} + while [[ ! -S /tmp/gunicorn.sock && retries -gt 0 ]]; do sleep 0.5 ((retries--)) @@ -81,7 +82,7 @@ wait_for_gunicorn_socket() { if [[ -S /tmp/gunicorn.sock ]]; then debug_log "Gunicorn socket file found" else - warn_log "Gunicorn socket file not found after waiting 30s!" + warn_log "Gunicorn socket file not found after waiting!" fi } diff --git a/env.template b/env.template index 88f4f79ed..2b981087f 100644 --- a/env.template +++ b/env.template @@ -122,6 +122,7 @@ WEB_SERVER_KEEPALIVE=2 WEB_SERVER_MAX_REQUESTS=1000 WEB_SERVER_MAX_REQUESTS_JITTER=100 WEB_SERVER_WORKER_CONNECTIONS=1000 +WEB_SERVER_GUNICORN_RETRIES=60 IPV4_ONLY=false # Redis Workers From 53330536e00249bbc3272c3e1cf03a14fecee4c2 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 10 Jan 2026 14:26:36 -0500 Subject: [PATCH 2/3] change to WEB_SERVER_GUNICORN_WAIT --- docker/init_scripts/init | 6 +++--- env.template | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/init_scripts/init b/docker/init_scripts/init index 37279ca0a..b22134754 100755 --- a/docker/init_scripts/init +++ b/docker/init_scripts/init @@ -72,17 +72,17 @@ run_startup() { wait_for_gunicorn_socket() { debug_log "Waiting for gunicorn socket file..." - local retries=${WEB_SERVER_GUNICORN_RETRIES:=60} + local retries=${WEB_SERVER_GUNICORN_WAIT:=30} while [[ ! -S /tmp/gunicorn.sock && retries -gt 0 ]]; do - sleep 0.5 + sleep 1 ((retries--)) done if [[ -S /tmp/gunicorn.sock ]]; then debug_log "Gunicorn socket file found" else - warn_log "Gunicorn socket file not found after waiting!" + warn_log "Gunicorn socket file not found after waiting ${WEB_SERVER_GUNICORN_WAIT:=30} seconds!" fi } diff --git a/env.template b/env.template index 2b981087f..2e9f2a1cb 100644 --- a/env.template +++ b/env.template @@ -122,7 +122,7 @@ WEB_SERVER_KEEPALIVE=2 WEB_SERVER_MAX_REQUESTS=1000 WEB_SERVER_MAX_REQUESTS_JITTER=100 WEB_SERVER_WORKER_CONNECTIONS=1000 -WEB_SERVER_GUNICORN_RETRIES=60 +WEB_SERVER_GUNICORN_WAIT=30 IPV4_ONLY=false # Redis Workers From f40dcb25a6f11d7e61182a5a16b821ba33bd573c Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sat, 10 Jan 2026 14:32:32 -0500 Subject: [PATCH 3/3] change it again --- docker/init_scripts/init | 7 ++++--- env.template | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/init_scripts/init b/docker/init_scripts/init index b22134754..88444ee4d 100755 --- a/docker/init_scripts/init +++ b/docker/init_scripts/init @@ -72,17 +72,18 @@ run_startup() { wait_for_gunicorn_socket() { debug_log "Waiting for gunicorn socket file..." - local retries=${WEB_SERVER_GUNICORN_WAIT:=30} + local wait_seconds=${WEB_SERVER_GUNICORN_WAIT_SECONDS:=30} + local retries=$((wait_seconds * 2)) while [[ ! -S /tmp/gunicorn.sock && retries -gt 0 ]]; do - sleep 1 + sleep 0.5 ((retries--)) done if [[ -S /tmp/gunicorn.sock ]]; then debug_log "Gunicorn socket file found" else - warn_log "Gunicorn socket file not found after waiting ${WEB_SERVER_GUNICORN_WAIT:=30} seconds!" + warn_log "Gunicorn socket file not found after waiting ${wait_seconds}s!" fi } diff --git a/env.template b/env.template index 2e9f2a1cb..01edc57a7 100644 --- a/env.template +++ b/env.template @@ -122,7 +122,7 @@ WEB_SERVER_KEEPALIVE=2 WEB_SERVER_MAX_REQUESTS=1000 WEB_SERVER_MAX_REQUESTS_JITTER=100 WEB_SERVER_WORKER_CONNECTIONS=1000 -WEB_SERVER_GUNICORN_WAIT=30 +WEB_SERVER_GUNICORN_WAIT_SECONDS=30 IPV4_ONLY=false # Redis Workers