Backport #62648 to 24.3: set correct defaults for s3 storage and backups

This commit is contained in:
robot-clickhouse 2024-04-15 16:06:26 +00:00
parent cf6d623c2f
commit 3206f82508
2 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,8 @@ namespace
client_configuration.connectTimeoutMs = 10 * 1000;
/// Requests in backups can be extremely long, set to one hour
client_configuration.requestTimeoutMs = 60 * 60 * 1000;
client_configuration.http_keep_alive_timeout = S3::DEFAULT_KEEP_ALIVE_TIMEOUT;
client_configuration.http_keep_alive_max_requests = S3::DEFAULT_KEEP_ALIVE_MAX_REQUESTS;
S3::ClientSettings client_settings{
.use_virtual_addressing = s3_uri.is_virtual_hosted_style,

View File

@ -1427,6 +1427,8 @@ void StorageS3::Configuration::connect(const ContextPtr & context)
/// seems as we don't use it
client_configuration.maxConnections = static_cast<unsigned>(request_settings.max_connections);
client_configuration.connectTimeoutMs = local_settings.s3_connect_timeout_ms;
client_configuration.http_keep_alive_timeout = S3::DEFAULT_KEEP_ALIVE_TIMEOUT;
client_configuration.http_keep_alive_max_requests = S3::DEFAULT_KEEP_ALIVE_MAX_REQUESTS;
auto headers = auth_settings.headers;
if (!headers_from_ast.empty())