Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: timeout not set in S3Client #46303

Closed
4 of 8 tasks
FedericoHeichou opened this issue Jul 4, 2024 · 1 comment · Fixed by #46317
Closed
4 of 8 tasks

[Bug]: timeout not set in S3Client #46303

FedericoHeichou opened this issue Jul 4, 2024 · 1 comment · Fixed by #46317

Comments

@FedericoHeichou
Copy link
Contributor

⚠️ 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

  1. Setup a external storage with type Amazon S3
  2. Simulate a network problem
  3. 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?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@FedericoHeichou FedericoHeichou added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 4, 2024
@solracsf
Copy link
Member

solracsf commented Jul 5, 2024

PR at #46317

@solracsf solracsf added 2. developing Work in progress feature: object storage 28-feedback and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 5, 2024
@AndyScherzinger AndyScherzinger added this to the Nextcloud 30 milestone Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants