Skip to content

feat(objectstore): add configurable S3 retry attempts - #56502

Merged
kesselb merged 1 commit into
masterfrom
feat/s3-configurable-max-attempts
Nov 19, 2025
Merged

feat(objectstore): add configurable S3 retry attempts#56502
kesselb merged 1 commit into
masterfrom
feat/s3-configurable-max-attempts

Conversation

@nfebe

Copy link
Copy Markdown
Contributor

Add retriesMaxAttempts parameter to S3 objectstore configuration to allow customization of AWS SDK retry behavior for handling unreliable network conditions or proxy issues.

Defaults to 5 retries (AWS SDK default) if not specified.

@nfebe
nfebe requested review from artonge and kesselbNovember 17, 2025 23:23
@nfebe
nfebe requested a review from a team as a code ownerNovember 17, 2025 23:23
@nfebe
nfebe requested review from CarlSchwan, leftybournes and provokateurin and removed request for a teamNovember 17, 2025 23:23
@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to stable31

@nfebe

Copy link
Copy Markdown
ContributorAuthor

/backport to stable32

Comment on lines +1980 to +1982
// optional: Maximum number of retry attempts for failed S3 requests
// Default: 5
'retriesMaxAttempts' => 5,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add that to the existing entry line 1905?

'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' => [
// trystack will use your Facebook ID as the username
'username' => 'facebook100000123456789',
// in the trystack dashboard, go to user -> settings -> API Password to
// generate a password
'password' => 'Secr3tPaSSWoRdt7',
// must already exist in the objectstore, name can be different
'container' => 'nextcloud',
// prefix to prepend to the fileid, default is 'oid:urn:'
'objectPrefix' => 'oid:urn:',
// create the container if it does not exist. default is false
'autocreate' => true,
// required, dev-/trystack defaults to 'RegionOne'
'region' => 'RegionOne',
// The Identity / Keystone endpoint
'url' => 'http://8.21.28.222:5000/v2.0',
// uploadPartSize: size of the uploaded chunks, defaults to 524288000
'uploadPartSize' => 524288000,
// required on dev-/trystack
'tenantName' => 'facebook100000123456789',
// dev-/trystack uses swift by default, the lib defaults to 'cloudFiles'
// if omitted
'serviceName' => 'swift',
// The Interface / URL Type, optional
'urlType' => 'internal',
// Maximum amount of data that can be uploaded
'totalSizeLimit' => 1024 * 1024 * 1024,
],
],

@nfebenfebeNov 19, 2025

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that is for swift not s3?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, weird that we have an entry for swift only.
We should also add some documentation here then: https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep your change then :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to document all supported options here too then: for instance totalSizeLimit, objectPrefix, use_path_style, concurrency, proxy, connect_timeout, timeout, uploadPartSize, putSizeLimit, useMultipartCopy, copySizeLimit, legacy_auth, version, verify_bucket_exists, autocreate, storageClass (and there's even more in S3ConnectionTrait).

Maybe just a bunch of common ones?

Some of there are not in the documentation as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I've overlooked the comment 🙈
Sounds good to me 👍

Add retriesMaxAttempts parameter to S3 objectstore configuration
to allow customization of AWS SDK retry behavior for handling
unreliable network conditions or proxy issues.
Defaults to 5 retries (AWS SDK default) if not specified.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the feat/s3-configurable-max-attempts branch from 1274580 to 3030783CompareNovember 19, 2025 15:18

@kesselbkesselb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

@kesselb
kesselb merged commit 9b2e31b into masterNov 19, 2025
185 of 187 checks passed
@kesselb
kesselb deleted the feat/s3-configurable-max-attempts branch November 19, 2025 20:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@nfebe@tcitworld@kesselb@artonge@leftybournes@provokateurin