Skip to content

[Bug]: automatically retry requests from Nextcloud to S3 #51833

@mahibi

Description

@mahibi

⚠️ This issue respects the following points: ⚠️

Bug description

Nextcloud does not retry requests to S3, when there is a 5xx response. Also see https://repost.aws/en/knowledge-center/http-5xx-errors-s3

A 503 response could look like:

{"reqId":"...................","level":3,"time":"2025-03-25T13:51:52+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job OCA\\Files\\BackgroundJob\\TransferOwnership (id: ........., arguments: {\"id\":21})","userAgent":"--","version":"30.0.8.2","exception":{"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\BadGateway"
...
AWS HTTP error: Server error: `PUT [https://.........................`](https://...............) resulted in a `503 Service Unavailable`
...

The operation (e.g. TransferOwnership) fails and there is no info about this to the user.

Steps to reproduce

Execute requests to S3 and try to trigger a 5xx response
(it happened for a TransferOwnership request to an S3 environment with objectstore_multibucket, so the data has to be downloaded to nextcloud and be uploaded to the other bucket.)

Expected behavior

If requests to S3 return 5xx, Nextcloud should retry the request.

Nextcloud Server version

30

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

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Type

No type

Projects

Status

☑️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions