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

Large parallel uploads (> 100 GB) failing due to timeout? #429

Closed
0sander opened this issue Sep 29, 2020 · 2 comments
Closed

Large parallel uploads (> 100 GB) failing due to timeout? #429

0sander opened this issue Sep 29, 2020 · 2 comments
Labels

Comments

@0sander
Copy link

0sander commented Sep 29, 2020

Question
I am using tusd with tus-js-client to upload large files (> 100 GB) using parallel uploads (10 uploads). I see uploads failing sometimes, with the final file not being concatenated. The browser receives a timeout during the final HTTP call (Upload-Concat), which is likely caused by tusd taking too long to concatenate the file. I suspect that tusd stops the concatenation once the timeout has been reached.

Even if I set the tusd timeout to 0 (infinite) the browser will still timeout at some point - I believe it is 5 minutes in chrome.

Have you seen this behaviour with large parallel uploads and is there a solution to it? Can I make tusd send the response to the final Upload-Concat before the file is completely concatenated? I was also thinking about using onChunkComplete in tus-js-client and simply consider the upload done / resolve once all bytes have been received.

Setup details

Operating System: Linux (Ubuntu 20.04)
Used tusd data storage: disk store via NFS mount
Used tusd configuration: -upload-dir=/data/incoming -host=127.0.0.1 -behind-proxy -expose-metrics=false -hooks-dir=/data/tushooks
Used tus client library: tus-js-client using parallel uploads (10 uploads)

@Acconut
Copy link
Member

Acconut commented Sep 29, 2020

I haven't seen this behavior before. What timeout are you exactly seeing? Is it a timeout sent from the tusd server or is it a timeout from the browser because it didn't receive the response in 5 minutes? Also, do the logs from tusd mention something?

If you are concatenation a 100GB file, you have to know that once all individual uploads are finished, tusd will read each individual upload and write the entire 100GB to disk again. Depending on your NFS setup, these 100GB might take too long to read and write, causing the long wait time. Maybe you also want to evaluate the performance of your NFS system.

Have you seen this behaviour with large parallel uploads and is there a solution to it?

No, I have never seen that before.

Can I make tusd send the response to the final Upload-Concat before the file is completely concatenated?

No, that is not possible and I don't think it would be a good solution.

I was also thinking about using onChunkComplete in tus-js-client and simply consider the upload done / resolve once all bytes have been received.

I would not recommend this approach since this will swallow errors with can occur during concatenation.

@Acconut
Copy link
Member

Acconut commented Feb 10, 2021

Closing this issue due to a lack of information. Feel free to leave a comment if you want to continue the discussion :)

@Acconut Acconut closed this as completed Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants