mirror of
https://github.com/nextcloud/server.git
synced 2026-04-01 15:18:09 -04:00
Merge pull request #53532 from nextcloud/backport/53498/stable31
[stable31] fix(ObjectStore): Make S3 "connect_timeout" option configurable
This commit is contained in:
commit
ae5febb34d
2 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,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;
|
||||
|
|
@ -102,8 +103,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…
Reference in a new issue