From 2be51778cf9061c77e743edcc05c64b4bd82bb71 Mon Sep 17 00:00:00 2001 From: serversidehannes Date: Thu, 2 Jul 2026 12:02:50 +0200 Subject: [PATCH] fix(chart): close client connections per response to stop 400 on aborted uploads barman multipart PUT uploads intermittently fail with HAProxy's built-in "400 Bad request". When a backend pod is killed mid-body (KEDA churn + option redispatch), HAProxy responds before the request body is fully read; on a kept-alive client connection the leftover body bytes are then parsed as the next request line, which is not valid HTTP, so HAProxy emits a 400 and the client fails the part. Add option httpclose so a poisoned client connection is never reused. http-server-close would not help: the desync is on the client-facing side. --- chart/templates/frontproxy/configmap.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chart/templates/frontproxy/configmap.yaml b/chart/templates/frontproxy/configmap.yaml index d56e9ef..706efd3 100644 --- a/chart/templates/frontproxy/configmap.yaml +++ b/chart/templates/frontproxy/configmap.yaml @@ -17,6 +17,17 @@ data: log global option httplog option dontlognull + # Close the client connection after each response instead of keeping it + # alive. A backup floods multipart PUTs; when a backend pod is killed + # mid-body (KEDA churn + `option redispatch`), the response is sent before + # the request body is fully read, and on a kept-alive connection the + # leftover body bytes get parsed as the next request line -> not valid HTTP + # -> HAProxy emits its own "400 Bad request" and the client (barman) fails + # the part. Closing per response means a poisoned connection is never + # reused. http-server-close does NOT help here: the desync is on the + # client-facing connection. Cost is negligible (plaintext internal HTTP, + # large sequential parts). + option httpclose timeout connect {{ .Values.frontproxy.timeouts.connect }} timeout client {{ .Values.frontproxy.timeouts.client }} timeout server {{ .Values.frontproxy.timeouts.server }}