From 784244e188ff93fc0d8bfb0c4d389253c8ef904e Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Thu, 25 Dec 2025 02:38:37 +0400 Subject: [PATCH] Proxy: unbusy stale HTTP/2 request body buffers on next upstream. Similarly to previous changes, if a buffered request body wasn't fully sent, a partially sent buffer was sitting in the busy chain and not recycled when switching to the next upstream server. This resulted in a stalled connection because ngx_output_chain() could not get a free buffer to read the next portion of request body. --- src/http/modules/ngx_http_proxy_v2_module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http/modules/ngx_http_proxy_v2_module.c b/src/http/modules/ngx_http_proxy_v2_module.c index 762c1889b..e30a9da7b 100644 --- a/src/http/modules/ngx_http_proxy_v2_module.c +++ b/src/http/modules/ngx_http_proxy_v2_module.c @@ -983,6 +983,10 @@ ngx_http_proxy_v2_body_output_filter(void *data, ngx_chain_t *in) ngx_free_chain(r->pool, ln); } + + for (ln = ctx->busy; ln; ln = ln->next) { + ln->buf->pos = ln->buf->last; + } } if (in) {