XHRUpload upload stalled for 30s
See original GitHub issueI am using the XHRUpload plugin with uppy with mostly its default configuration.
I noticed that for all the files that are greater than 50MB the upload progress gets close to 100% (by looking at the callback data of the upload-progress
handler) but then the upload fails with the error Upload stalled for 30 seconds, aborting
.
That was happening on different servers and since I am not configuring the timeout
option (30s by default) I tried to increase it (and actually setting it to 60s kind of solved the issue, at least for files < 100MB). At first I though at some issue with the servers but I got the same error also when using a fake upload server (just an endpoint that accepts a post request and returns OK, nothing else).
I had a look and tried your XHRUpload sample to (https://uppy.io/examples/xhrupload/) and it failed in the same way with files greater than 50MB (succeeded for smaller files).
I did not find any particular warnings about the files size so I am not sure it is something that only depends on the server… could it be an issue with the plugin? or is it the intended way it should work? Because it doesn’t seem to be doing anything after it uploads all the data, just waiting for something
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (1 by maintainers)
Guys, do you have any solution for this issue? I am last version of Uppy
Managed to reproduce on MacOS by starting an upload and then setting Network Link Conditioner to 100% loss.
But I would say this is working as intented. We might want to increase default progress timeout past 30 seconds, because sometimes connections will have hiccups that last more than 30 sec, or for some reason XHR progress events get delayed by 30+sec. However XHR is simply not suited for uploading large files over unreliable connections. We might want to add a retry option too, but again for large files, retry is not very good because it will start all over from the beginning. It’s recommended to use a different protocol like TUS which is better suited for retries and batched uploading of large files.