From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id A5AEF1FF0AA for ; Mon, 07 Sep 2026 18:04:49 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1C28E214EC; Mon, 07 Sep 2026 18:04:46 +0200 (CEST) From: Samuel Rufinatscha To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox 1/1] fix #7948: acme: disable HTTP connection pooling Date: Mon, 7 Sep 2026 18:04:33 +0200 Message-ID: <20260907160434.262678-2-s.rufinatscha@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260907160434.262678-1-s.rufinatscha@proxmox.com> References: <20260907160434.262678-1-s.rufinatscha@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1788797073793 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.571 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: JXTIQEHK6UOZ7BWEZFB5SCAYMA6CQ7QY X-Message-ID-Hash: JXTIQEHK6UOZ7BWEZFB5SCAYMA6CQ7QY X-MailFrom: s.rufinatscha@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Disable the connection pool for ACME to avoid reusing stale CA connections. Signed-off-by: Samuel Rufinatscha Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7948 --- proxmox-acme/src/async_client.rs | 1 + proxmox-http/src/client/simple.rs | 9 +++++++-- proxmox-http/src/http_options.rs | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/proxmox-acme/src/async_client.rs b/proxmox-acme/src/async_client.rs index bba92023..f5b2b148 100644 --- a/proxmox-acme/src/async_client.rs +++ b/proxmox-acme/src/async_client.rs @@ -32,6 +32,7 @@ impl AcmeClient { proxy_config: None, // fixme??? user_agent: Some(USER_AGENT_STRING.to_string()), tcp_keepalive: Some(TCP_KEEPALIVE_TIME), + pool_max_idle_per_host: Some(0), }; let http_client = Client::with_options(options); diff --git a/proxmox-http/src/client/simple.rs b/proxmox-http/src/client/simple.rs index 0ea77768..3cc4e5a0 100644 --- a/proxmox-http/src/client/simple.rs +++ b/proxmox-http/src/client/simple.rs @@ -51,8 +51,13 @@ impl Client { https.set_proxy(proxy_config.clone()); } - let client = - HyperClient::builder(TokioExecutor::new()).build::(https); + let mut builder = HyperClient::builder(TokioExecutor::new()); + + if let Some(max_idle) = options.pool_max_idle_per_host { + builder.pool_max_idle_per_host(max_idle); + } + + let client = builder.build::(https); Self { client, options } } diff --git a/proxmox-http/src/http_options.rs b/proxmox-http/src/http_options.rs index 1124aa26..1ae7ec5b 100644 --- a/proxmox-http/src/http_options.rs +++ b/proxmox-http/src/http_options.rs @@ -9,6 +9,9 @@ pub struct HttpOptions { pub user_agent: Option, /// TCP keepalive time, defaults to 7200 pub tcp_keepalive: Option, + /// Maximum number of idle connections retained per host. + /// `None` uses the HTTP client default, `Some(0)` disables pooling. + pub pool_max_idle_per_host: Option, } impl HttpOptions { -- 2.47.3