views:

248

answers:

1

I have an ASP.NET page that contains three DIVs, each of which is initially displayed via partial page includes - this works fine.

Each DIV contains a grid of entries that can be paged through or sorted by a particular column. These updates are done via AJAX requests and this also works just fine.

My problem occurs when carrying out the main interaction with the page, which is associateing items from one list with items in another. The first DIV contains a list of flights, the second DIV contains a list of people who are associated with a flight (Along with a reference to which flight) and the third DIV contains a list of people who are not associated with any flight at all. Using various ui elements, I can carry out operations such as...

  1. Add a flight
  2. Assign a person to a flight
  3. Remove a person from a flight
  4. Move a person to different flight
  5. Delete a flight

Each of these operations has a varying effect on one or more of the lists so, upon completion, I simply call the AJAX requests necessary to update each of the DIVs.

Sometimes, one or more of the DIVs doesn't update, other times the browser spins forever and (even though I can navigate to other pages) hangs if it encounters another AJAX request.

This sequence of calls are done one after the other, with no mechanism to wait for the previous one to complete before proceeding with the next, so I suspect that there is some kind of queuing/blocking going on. Having investigated other topic on SO, I found references to problems being caused by AJAX requests being processed out of order, but I'm fairly sure that this doesn't apply in this case as, generally, it doesn't matter which order the DIVs are updated.

I'm aware that browsers have a limit to the number of concurrent XMLHttpRequests that can be active at once, but I thought that requests would be queued until previous requests da completed.

Has anybody else encountered similar problems?

EDIT:

I've monitored the situation with Fiddler and, when the problem occurs, some of the requests just simply don't show up in the sessions window.

+1  A: 

If the sessions don't show up in Fiddler, that means the HTTP request was never made. If the browser is spinning without making progress, that suggests HTTP connection pool exhaustion.

Does this only occur with a particular browser? If it's IE6 or 7, does the problem occur after running http://www.enhanceie.com/dl/fixHTTPMax.reg and restarting?

EricLaw -MSFT-
Hmmm, interesting idea. Unfortunately, it seems unlikely, as I'm only issuing 3 requests at once, whereas the fix that you've supplied is apparently to overcome the XP SP2 default of 10 concurrent connections. I'm also not sure about the practicalities of getting all users (Even my small number of users) to modify their browser settings. Also, in the manner of intermittent bugs, it doesn't seem to be happening this morning, so I'll have to defer a definitive answer until later. In the meantime I'll award you 10 QI points (Or an upvote if you're not from the UK) for being interesting.
belugabob
Oh, I'm not suggesting that you should get your users to change their connection limit, I'm just trying to determine that if this is a HTTP connection pool problem. (Incidentally, the TCP/IP "pending open" limit you're referring to has nothing to do with the HTTP active connection limit).
EricLaw -MSFT-
Ok, point taken - will investigate further.
belugabob