Browse Source

Merge pull request #53531 from nextcloud/backport/53498/stable30

[stable30] fix(ObjectStore): Make S3 "connect_timeout" option configurable
pull/53576/head
Andy Scherzinger 5 months ago
committed by GitHub
parent
commit
42e16a9879
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      lib/private/Files/ObjectStore/S3ConfigTrait.php
  2. 4
      lib/private/Files/ObjectStore/S3ConnectionTrait.php

4
lib/private/Files/ObjectStore/S3ConfigTrait.php

@ -18,6 +18,10 @@ trait S3ConfigTrait {
/** Maximum number of concurrent multipart uploads */
protected int $concurrency;
/** Timeout, in seconds, for the connection to S3 server, not for the
* request. */
protected float $connectTimeout;
protected int $timeout;
protected string|false $proxy;

4
lib/private/Files/ObjectStore/S3ConnectionTrait.php

@ -40,6 +40,7 @@ trait S3ConnectionTrait {
// Default to 5 like the S3 SDK does
$this->concurrency = $params['concurrency'] ?? 5;
$this->proxy = $params['proxy'] ?? false;
$this->connectTimeout = $params['connect_timeout'] ?? 5;
$this->timeout = $params['timeout'] ?? 15;
$this->storageClass = !empty($params['storageClass']) ? $params['storageClass'] : 'STANDARD';
$this->uploadPartSize = $params['uploadPartSize'] ?? 524288000;
@ -103,8 +104,7 @@ trait S3ConnectionTrait {
'use_arn_region' => false,
'http' => [
'verify' => $this->getCertificateBundlePath(),
// Timeout for the connection to S3 server, not for the request.
'connect_timeout' => 5
'connect_timeout' => $this->connectTimeout,
],
'use_aws_shared_config_files' => false,
'retries' => [

Loading…
Cancel
Save