Compare commits

...

1 Commits

Author SHA1 Message Date
Charles GTE 54b88b4d17 fix: adding retry config for s3 provider 2026-03-21 08:50:10 +01:00
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ services:
APP_ENV: development
LOG: debug
TZ: "Europe/Paris"
EDGE_KEY: "eyJzZXJ2ZXJVcmwiOiJodHRwOi8vbG9jYWxob3N0Ojg4ODciLCJhZ2VudElkIjoiMmVkZWFlYjctNWYwNi00MjI1LWIzNWItOGYyM2MwOTMyMTA2IiwibWFzdGVyS2V5QjY0IjoiMUh0djdtWCtYVkJxL0IzUEV2WDlZZjlQeUdVZW5oRHlXemo5THRqNW90WT0ifQ=="
EDGE_KEY: "eyJzZXJ2ZXJVcmwiOiJodHRwOi8vbG9jYWxob3N0Ojg4ODciLCJhZ2VudElkIjoiNWU1OGU2MGEtODhiMy00YTBjLWI0NDktNTQ3OWZhOTQzZDBkIiwibWFzdGVyS2V5QjY0IjoiQlhWM1hvbEM2NTZTVjdkTmdjV1BHUWxrKytycExJNmxHRGk3Q1BCNWllbz0ifQ=="
#POOLING: 1
#DATABASES_CONFIG_FILE: "config.toml"
extra_hosts:
+10
View File
@@ -16,6 +16,9 @@ use aws_sdk_s3::types::{CompletedMultipartUpload, CompletedPart};
use futures::StreamExt;
use std::pin::Pin;
use std::sync::Arc;
use std::time::Duration;
use aws_config::retry::RetryConfig;
use aws_sdk_s3::config::retry::ReconnectMode;
use tokio::fs;
use tracing::{error, info};
use crate::services::backup::models::{BackupResult, UploadResult};
@@ -107,7 +110,14 @@ impl StorageProvider for S3Provider {
info!("S3 endpoint to {}", &endpoint);
let retry_config = RetryConfig::standard()
.with_max_attempts(5)
.with_initial_backoff(Duration::from_millis(200))
.with_max_backoff(Duration::from_secs(5))
.with_reconnect_mode(ReconnectMode::ReuseAllConnections);
let sdk_config = s3::config::Builder::new()
.retry_config(retry_config)
.credentials_provider(credentials)
.region(region)
.force_path_style(true)