From e6cb4e4a5bd06465c1f6f9084edf9458dd573bfa Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Mon, 21 Sep 2026 10:08:40 -0700 Subject: [PATCH] Extend Captain reload keepalive window --- template/root-nginx-conf.ejs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/root-nginx-conf.ejs b/template/root-nginx-conf.ejs index 966c29f5..32b77c09 100644 --- a/template/root-nginx-conf.ejs +++ b/template/root-nginx-conf.ejs @@ -42,10 +42,10 @@ listen 80; client_max_body_size 300m; - # Keep idle API connections alive briefly during a graceful reload. This - # gives clients time to reuse the old-worker connection and receive a - # graceful Connection: close response instead of racing the worker exit. - keepalive_min_timeout 1s; + # Keep idle API connections alive during a graceful reload long enough for + # pooled clients to retire them. Node's default agent keeps idle sockets for + # 5 seconds, so leave a safety margin beyond that client-side timeout. + keepalive_min_timeout 10s; gzip on; gzip_disable "MSIE [1-6]\.";