Open Bug 1642459 Opened 4 years ago Updated 3 years ago

xmlHttpRequest is hanging up the page when sending files larger then 10mb in a single request.

Categories

(Core :: DOM: Networking, defect, P3)

76 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: gzbakku, Unassigned)

Details

(Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

//x file is file of size 150mb
//then read x with filereader api as array buffer
//break the array buffer into 20mb chunks by slicing the array into new Int8Array

!!! breaks here !!!
//then send the chunks individually to a api with xmlHttpRequest in 20mb size each.

!!! >>> this action stops the event loop for some time and the page becomes unresponsive for like 30 secs with each chunk and this setup works fine on chrome.

// listen to onload, onerror, ontimeout, onabort on xmlHttpRequest and onprogress event on xmlHttpRequestUpload object received from the parent request by upload method.

Actual results:

while uploading data more than 10MB with xmlHttpRequest api as arrayBuffer to backbalze b2 or any other vanila http api the page stops processing and ask the user to stop the page or wait. The request is successful immediately on chrome but not on Firefox. it takes a good amount of time for the request to start processing usually more then 30 sec's before everything gets responsive again, and the progress event is called;

Expected results:

the xmlHttpRequest should not have blocked the main thread and be processed asynchronously and started to send data immediately after the request is called not wait or hang up for up to a minute

please let me know if you need any code or anything your help is appreciated very much.

this only happens when the server responds with a error code and before the xmlHttpRequest completes sending the data.

Hi,
I don't have the technical knowledge to confirm this issue but I'll add product and component so the team can make some research on it. Hopefully, someone with a more deep understanding of this matter can help. Feel free to route this ticket to the corresponding team.

Regards,
Jerónimo.

Component: Untriaged → Networking: HTTP
Flags: needinfo?(nhnguyen)
Product: Firefox → Core

to be triaged as per our usual process

Flags: needinfo?(nhnguyen)

well where should i feel the bug can you please guide me

i am sorry where should i forward the bug.

well i figured out whats happening when the server responds before the xmlHttpRequest has sent the request data the event loop starts to listen to the respond which is already received this stops the event loop there is nothing devs can do to resolve this issue if timeout is used we never receive the response this should be fixed at browser level.

Severity: -- → S3
Component: Networking: HTTP → DOM: Networking
Priority: -- → P2
Whiteboard: [necko-triaged]
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.