[pbs-devel] [PATCH proxmox 4/5] s3-client: bump s3 request timeout from 1 minute to 30 minutes

Christian Ebner c.ebner at proxmox.com
Mon Aug 25 12:32:47 CEST 2025


The currently chosen value of 1 minute was to low for several
operations such as, e.g. fetching of chunks over low download
bandwidth connections. Since the download size is not known a-priory
and other operations such as list objects v2 might also take
considerably more time, bump the timeout unconditionally. The TCP
keepalive timeout for the connection is bumped to the same value, so
the connection is not dropped before that for requests where no data
is send before getting the response (e.g. list_object_v2() calls).

The 30 minutes translate to an average download rate of about 2.3
KiB/s for a 4 MiB data blob.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 proxmox-s3-client/src/client.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-s3-client/src/client.rs b/proxmox-s3-client/src/client.rs
index ab2582bf..559990a1 100644
--- a/proxmox-s3-client/src/client.rs
+++ b/proxmox-s3-client/src/client.rs
@@ -32,10 +32,10 @@ use crate::response_reader::{
 };
 
 /// Default timeout for s3 api requests.
-pub const S3_HTTP_REQUEST_TIMEOUT: Duration = Duration::from_secs(60);
+pub const S3_HTTP_REQUEST_TIMEOUT: Duration = Duration::from_secs(30 * 60);
 
 const S3_HTTP_CONNECT_TIMEOUT: Duration = Duration::from_secs(10);
-const S3_TCP_KEEPALIVE_TIME: u32 = 120;
+const S3_TCP_KEEPALIVE_TIME: u32 = 30 * 60;
 const MAX_S3_UPLOAD_RETRY: usize = 3;
 // Assumed minimum upload rate of 1 KiB/s for dynamic put object request timeout calculation.
 const S3_MIN_ASSUMED_UPLOAD_RATE: u64 = 1024;
-- 
2.47.2





More information about the pbs-devel mailing list