-
Notifications
You must be signed in to change notification settings - Fork 485
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
Context canceled on S3 upload when upload speed is throttled #1172
Comments
Can you give me more details to reproduce this? Which browser did you use and how did you throttle it? What tus-js-client configuration did you use? What are the full logs from tusd? |
Thanks for the additional details. I will look into this in two weeks. Does this also happen if you upload directly to tusd without using Caddy as a reverse proxy? |
Tusd buffers data on disk before uploading it to S3. This happens in chunks, so the entire file isn't stored on disk. We have to do this because S3 expects us to known the size of the chunk we are uploading. See #1084 for more details and a potential alternative/improvement. |
S3 uploads are performing using S3 nultipart uploads, which don't shown up in the file explorer and ListObjects calls until the upload is done. |
Thanks for you explanation and the insides. Very helpful. Do you also have an explanation why it has no writes on the disk, if throttling is disabled as you can see in the first screenshot? |
Tested it without Caddy today and I couldn't reproduce it. So it seems it's an issue when using caddy. |
I solved the issue by setting
@akkie I'm sure there should be a similar command line param. |
Describe the bug
I locally test tusd with Minio. To test my frontend I throttle the upload speed in the browser. If I upload as example 30 image files, then after a certain time I get a lot of
operation error S3: CompleteMultipartUpload, context canceled
messages in the tusd log. Maybe it's a timeout on the writing side to S3?There is no such problem if I do not throttle. But this might be still an issue if a client uploads data with limited bandwidth.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should not be an error if the bandwidth is limited.
Setup details
Please provide following details, if applicable to your situation:
-s3-disable-ssl=true
-s3-endpoint=http://minio:9100
-port=9500
-max-size=1000000000
-cors-allow-origin=https://my.domain
-cors-allow-credentials=true
-behind-proxy=true
-show-greeting=false
-hooks-http=https://api.my.domain/hooks/tusd
-hooks-enabled-events=pre-create,pre-finish,post-finish
-hooks-http-forward-headers=Cookie
The text was updated successfully, but these errors were encountered: