all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
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	[thread overview]
Message-ID: <20260907160434.262678-2-s.rufinatscha@proxmox.com> (raw)
In-Reply-To: <20260907160434.262678-1-s.rufinatscha@proxmox.com>

Disable the connection pool for ACME to avoid reusing stale CA
connections.

Signed-off-by: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
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::<HttpsConnector, Body>(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::<HttpsConnector, Body>(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<String>,
     /// TCP keepalive time, defaults to 7200
     pub tcp_keepalive: Option<u32>,
+    /// 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<usize>,
 }
 
 impl HttpOptions {
-- 
2.47.3





  reply	other threads:[~2026-09-07 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 16:04 [PATCH proxmox{,-backup} 0/2] fix #7948: acme: disable connection pooling for certificate renewal Samuel Rufinatscha
2026-09-07 16:04 ` Samuel Rufinatscha [this message]
2026-09-07 16:04 ` [PATCH proxmox-backup 1/1] http: adapt to new pool_max_idle_per_host option Samuel Rufinatscha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260907160434.262678-2-s.rufinatscha@proxmox.com \
    --to=s.rufinatscha@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal