Chrome XHR stops responding after a while

1,308 views
Skip to first unread message

Shachar Zohar

unread,
Nov 21, 2013, 2:50:46 PM11/21/13
to chromi...@chromium.org
In this use-case I make multiple XHR for the same url (They are CORS as well).
After a while (e.g 70 requests down the road) the xhr's stop responding, no onload, no onerror, no onloadend.
In the network tab of the developers tool the request sais "pending".
If I just put the url on another tab it also doesn't respond.
If I put the url on a new incognito tab it does respond.
Checking the net-internals the new pending requests don't even create HTTP-STREAM-JOB
I do have an external timeout mechanism that aborts the xhr if a certain time passes.
So what I end up with is just sending request, it is pending, and then I abort it after few seconds and so on...
Note: I don't create new XMLHttpRequest() for each request, I reuse the object. (which seems to work untill it doesn't)

I could reproduce this on Chrome 31.0.xxxx on MAC OSX 10.9
couldn't reproduce on Windows

PhistucK

unread,
Nov 21, 2013, 2:55:30 PM11/21/13
to shac...@gmail.com, Chromium-dev
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page. A simple HTML file that reproduces the issue can be attached to the issue, which may expedite the fix.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

Thank you.



PhistucK


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Shachar Zohar

unread,
Nov 27, 2013, 6:20:38 AM11/27/13
to chromi...@chromium.org
I was able to reproduce the bug, apparently chrome doesn't allow multi-slotted a.k.a multi-threaded xhr's. If it happens to be that I'm downloading the same resource via a different tab or even I"m downloading a the file via chrome's downloader, The result of any parrallel xhr will be pending untill the first one is finished. This also happens if the requests are Range requests on different ranges - is this on purpose? will they fix this? btw it works on firefox.

PhistucK

unread,
Nov 27, 2013, 8:46:20 AM11/27/13
to Shachar Zohar, Chromium-dev
There is a limited number of concurrent connection to the same host. Perhaps Firefox has a higher limit, but if you increase the number of tabs that initiate the same requests, you will probably hit the limit in Firefox as well.


PhistucK


--

Shachar Zohar

unread,
Nov 27, 2013, 8:58:03 AM11/27/13
to chromi...@chromium.org
Phistuck: That is not the case, even only 2 connections are not possible when it's the same file, if it's still the same host but not the same file you can have multiple requests...


On Thursday, November 21, 2013 9:50:46 PM UTC+2, Shachar Zohar wrote:

PhistucK

unread,
Nov 27, 2013, 8:59:15 AM11/27/13
to Shachar Zohar, Chromium-dev
Oh, so I bet it is a caching issue.


PhistucK


--

Shachar Zohar

unread,
Nov 27, 2013, 9:03:36 AM11/27/13
to chromi...@chromium.org, Shachar Zohar
Browser caching issue? 
I don't know, seems like the folks at chromium decided, why should a user download the same resource twice in parallel. not considering the "Range" use-case.

PhistucK

unread,
Nov 27, 2013, 10:06:57 AM11/27/13
to Shachar Zohar, Chromium-dev
This sounds like a bug. Can you follow my first reply?

Thank you!


PhistucK

Shachar Zohar

unread,
Nov 27, 2013, 10:47:30 AM11/27/13
to chromi...@chromium.org


On Thursday, November 21, 2013 9:50:46 PM UTC+2, Shachar Zohar wrote:
Reply all
Reply to author
Forward
0 new messages