Skip to content

Conversation

@leftybournes
Copy link
Contributor

Summary

Sometimes, multipart upload requests to S3 are too frequent and we get a "slow down" response resulting in large file uploads (more than 5gb) failing. When the uploader fails, try uploading again and cut concurrent requests in half. Affects S3 as primary and external storage.

Checklist

@leftybournes leftybournes requested a review from a team as a code owner June 10, 2025 09:51
@leftybournes leftybournes requested review from artonge, icewind1991 and provokateurin and removed request for a team June 10, 2025 09:51
@leftybournes leftybournes added the 3. to review Waiting for reviews label Jun 10, 2025
@leftybournes leftybournes enabled auto-merge June 18, 2025 12:26
@leftybournes
Copy link
Contributor Author

/backport to stable31

@leftybournes
Copy link
Contributor Author

/backport to stable30

$uploader->upload();
$uploaded = true;
} catch (S3MultipartUploadException $e) {
$exception = $e;
Copy link
Contributor

@artonge artonge Jun 18, 2025

Choose a reason for hiding this comment

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

Is that necessary? If so, you can also simply rename the variable name in the catch declaration.

But I would probably do without to reduce the amount of changed line.

In any cases, let's not have two variables with the same content.

Copy link
Member

Choose a reason for hiding this comment

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

I think it makes the code more understandable, as you expect the variable from the catch declaration to be used within the brackets. However, $uploaded is not needed, as $exception is not null.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I missed the declaration above. It is a bit convoluted, but alright.

@leftybournes leftybournes merged commit ea98e4b into master Jun 18, 2025
193 checks passed
@leftybournes leftybournes deleted the leftybournes/fix/object_storage_large_uploads branch June 18, 2025 13:07
@ArtificialOwl
Copy link
Member

ArtificialOwl commented Jun 18, 2025

aouch, auto merge, my bad; should have waited for Louis' comment before approving

@leftybournes
Copy link
Contributor Author

Sorry about that. I probably should have held off on enabling auto merge for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants