Bug 27629 - Long Running requests block other resource requests
Summary: Long Running requests block other resource requests
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 16:34 PDT by David Starke
Modified: 2009-07-24 22:43 PDT (History)
2 users (show)

See Also:


Attachments
reduced test case (826.36 KB, application/octet-stream)
2009-07-23 16:34 PDT, David Starke
no flags Details
web inspector screenshot of testcase (after 30 min) (88.00 KB, image/png)
2009-07-23 16:46 PDT, David Starke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Starke 2009-07-23 16:34:15 PDT
Created attachment 33391 [details]
reduced test case

In some cases, a long request to the server (such as a comet style request) can block other requests from being sent to the server for the duration of the long request.

I have attached a zip file with a test case that uses Dojo and Persevere to demonstrate the issue.

This code causes a request to be made to the server for the resource "/channels".  The server will hold this connection open for 15 minutes.  Following this request, a simple loop generates 10 more requests to the server in rapid succession.  When I run this, I find that the last few requests never complete until the "channels" request finally ends.  Opening up the resources tab of the web inspector, the blocked requests show up in gray, as if they are still in progress.  However, a traffic logging tool such as Wireshark confirms that no request has actually been made to the server for these resources.

Although this example only has xhr requests as the obstructed resources, I have also seen image requests (referenced from css, triggered from events like hovers and other ui interactions) blocked by this issue.

I have observed this issue consistently in Safari and in recent nightly builds of Webkit.  For comparison, the issue does not occur in Firefox, which loads all 10 resource requests.

To run the test case, you will need a copy of the Persevere server, which can be obtained at http://code.google.com/p/persevere-framework/downloads/list or from www.persvr.org.  Copy the test.html file and the js directory from the attached archive into the base directory of your Persevere server, start the server, and then point the browser at the test.html file.
Comment 1 David Starke 2009-07-23 16:46:41 PDT
Created attachment 33392 [details]
web inspector screenshot of testcase (after 30 min)

This shows the web inspector resource panel after opening the test case page and letting it sit for 30 minutes.  Note that some of the requests for Capability did not complete until the same time as the channels request completed.
Comment 2 Brady Eidson 2009-07-23 18:32:57 PDT
You say "recent" nightlys - please give revision numbers where you've seen this, because we think we've improved this a lot in the last week or so.
Comment 3 David Starke 2009-07-23 20:42:55 PDT
(In reply to comment #2)
> You say "recent" nightlys - please give revision numbers where you've seen
> this, because we think we've improved this a lot in the last week or so.

I saw this today with 46282