Skip to content

Conversation

@nfebe
Copy link
Contributor

@nfebe nfebe commented Nov 17, 2025

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 kesselb November 17, 2025 23:23
@nfebe nfebe requested a review from a team as a code owner November 17, 2025 23:23
@nfebe nfebe requested review from CarlSchwan, leftybournes and provokateurin and removed request for a team November 17, 2025 23:23
@nfebe
Copy link
Contributor Author

nfebe commented Nov 17, 2025

/backport to stable31

@nfebe
Copy link
Contributor Author

nfebe commented Nov 17, 2025

/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
Contributor

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,
],
],

Copy link
Contributor Author

@nfebe nfebe Nov 19, 2025

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
Contributor

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
Contributor

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
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
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 <[email protected]>
@nfebe nfebe force-pushed the feat/s3-configurable-max-attempts branch from 1274580 to 3030783 Compare November 19, 2025 15:18
Copy link
Contributor

@kesselb kesselb left a comment

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 master Nov 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 free to 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.

7 participants