⚠️ This issue respects the following points: ⚠️
Bug description
The timeout is not set in the S3Client options.
|
$options = [ |
|
'version' => $this->params['version'] ?? 'latest', |
|
'credentials' => $provider, |
|
'endpoint' => $base_url, |
|
'region' => $this->params['region'], |
|
'use_path_style_endpoint' => isset($this->params['use_path_style']) ? $this->params['use_path_style'] : false, |
|
'signature_provider' => \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()), |
|
'csm' => false, |
|
'use_arn_region' => false, |
|
'http' => ['verify' => $this->getCertificateBundlePath()], |
|
'use_aws_shared_config_files' => false, |
|
]; |
If my s3 is unreachable and I run occ file:scan, it sets a lock on the file and hangs forever.
Changing the options like this works
'http' => ['verify' => $this->getCertificateBundlePath(), 'connect_timeout' => 10, 'timeout' => 10],
But it does not log anything in the file:scan and it is not marked as an error (maybe this is normal).
Steps to reproduce
- Setup a external storage with type Amazon S3
- Simulate a network problem
- Do
occ files:scan
Expected behavior
There should be a (configurable) timeout and should raise a error.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Bug description
The timeout is not set in the S3Client options.
server/lib/private/Files/ObjectStore/S3ConnectionTrait.php
Lines 92 to 103 in 03d71e8
If my s3 is unreachable and I run
occ file:scan, it sets a lock on the file and hangs forever.Changing the options like this works
But it does not log anything in the file:scan and it is not marked as an error (maybe this is normal).
Steps to reproduce
occ files:scanExpected behavior
There should be a (configurable) timeout and should raise a error.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response