question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XHRUpload upload stalled for 30s

See original GitHub issue

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

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
inajafcommented, Apr 22, 2022

Guys, do you have any solution for this issue? I am last version of Uppy

0reactions
mificommented, Dec 5, 2022

Managed to reproduce on MacOS by starting an upload and then setting Network Link Conditioner to 100% loss.

Screenshot 2022-12-05 at 22 17 10
[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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XHR Upload
The @uppy/xhr-upload plugin handles classic HTML multipart form uploads, ... in the Informer if an upload is being canceled because it stalled for...
Read more >
XMLHttpRequest Level 2 - Determinate if upload finished
This doesn't work, because the onload -event firest when the request is ready, not when upload is ready. Checking if upload progress percentage ......
Read more >
Issues when uploading a large file(180M) to asp.net using ajax
When client need to upload large file size to server, and show the progress. The solution is to slice the file to blob,...
Read more >
How to Change the Timeout on the Modern File Upload
/** * Change the timeout on the modern file upload from 30 to 60 seconds. * * @link https://wpforms.com/developers/how-to-change-the-timeout-on- ...
Read more >
XMLHttpRequest.upload - Web APIs - MDN Web Docs
The upload completed successfully. ... The upload timed out because a reply did not arrive within the time interval specified by the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found