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

Limit amount of concurrent tus requests #8987

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-limit-concurrent-tus-requests
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Limit amount of concurrent tus requests

The amount of concurrent tus requests when uploading has been reduced to 5. This fixes an issue where the access token renewal failed during an ongoing upload because of the sheer amount of pending requests.

https://github.com/owncloud/web/pull/8987
https://github.com/owncloud/web/issues/8977
4 changes: 4 additions & 0 deletions packages/web-runtime/src/services/uppyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@ export class UppyService {
overridePatchMethod: !!tusHttpMethodOverride,
retryDelays: [0, 500, 1000],
uploadDataDuringCreation,
limit: 5,
onBeforeRequest,
onShouldRetry: (err, retryAttempt, options, next) => {
// status code 5xx means the upload is gone on the server side
if (err?.originalResponse?.getStatus() >= 500) {
return false
}
if (err?.originalResponse?.getStatus() === 401) {
return true
}
return next(err)
}
}
Expand Down