uppy
uppy copied to clipboard
XHRUpload upload stalled for 30s
I 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
@aduh95 could you try to reproduce this, please?
I can reproduce:
[Uppy] [14:50:46] [FileInput] Something selected through input...
[Uppy] [14:50:46] Added file: compare.bmp
id: uppy-compare/bmp-1e-image/bmp-63766666-1623744082417
type: image/bmp
[Uppy] [14:50:46] [XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0
[Uppy] [14:50:46] [XHRUpload] Uploading...
[Uppy] [14:50:46] uploading 1 of 1
[Uppy] [14:50:46] [XHRUpload] ckpzh2xcr00013e5slagppx5i started
[Uppy] [14:50:47] [XHRUpload] ckpzh2xcr00013e5slagppx5i progress: 163840 / 63767055
…
[Uppy] [14:51:47] [XHRUpload] ckpzh2xcr00013e5slagppx5i progress: 12402688 / 63767055
[Uppy] [14:52:17] Failed to upload compare.bmp Upload stalled for 30 seconds, aborting.
If I force the timeout to Infinity
, I end up the following error:
Access to XMLHttpRequest at 'https://xhr-server.herokuapp.com/upload' from origin 'https://uppy.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
For completeness sake, I've tried disabling CORS on my browser, and I was now getting 503 errors. Maybe it's a bug or limitation on Heroku side?
I have the same problem
Did you change timeout
to uppy or php?
Same here.
I'm not able to reproduce locally, I was able to upload a 6 GiB file over 15 minutes, without hitting this limitation. IMHO it is indeed a limitation (bug?) of the Heroku demo.
Agreeing with @aduh95's outcome, we can reopen this if it occurs on other providers than Heroku as well.
I am facing the same issue on video upload. Please guide me: XHRUpload upload stalled for 30s
same here
Guys, do you have any solution for this issue? I am last version of Uppy
@Murderlon I am facing same error on laravel vue installation, it seems to just stall out on some images but works on some.

We are seeing this issue as well in an app and are not on Heroku. We show upload requests as completing successfully in the server logs (returning 2xx) but with no obvious pattern, users receive this error in the browser.
Yes, Even I am facing the same issue while uploading a large video file (8GB+).
Managed to reproduce on MacOS by starting an upload and then setting Network Link Conditioner to 100% loss.

[Uppy] [22:16:41] Failed to upload lofoten.mp4 Upload stalled for 30 seconds, aborting.
Error: Upload stalled for 30 seconds, aborting.
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.