Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/private/Files/ObjectStore/S3ConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Files/ObjectStore/S3ConnectionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected function parseParams($params) {
// 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;
Expand Down Expand Up @@ -103,8 +104,7 @@ public function getConnection() {
'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' => [
Expand Down
Loading