Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome XmlHttpRequest Hanging

When I make a XmlHttpRequest (via jQuery's $.ajax) to a particular URL, my Chrome consistently hangs every time with a status on the request of 'Pending'.

After that Chrome must be closed ie. forcibly from Task Manager, and it exhibits general signs of mayhem such as the Cookies and Scripts tabs being empty when they were full of normal looking data immediately prior.

This is odd because (a) my coworkers, running a seemingly identical everything, have no such problems; (b) I have been using Chrome to run this code (our company's JavaScript app) for many months and this just started happening for no apparent reason.

I checked out the Apache logs, they appear to be processing the request normally and to completion, but Chrome never sees the reply, apparently.

A couple of other clarifications: prior to the failure, the same Chrome and Apache return a truckload of JS and image files normally, eg., things seem to be fine right up until they aren't. The request is not particularly large (a few hundred bytes in and out) or complex in any obvious way.

If anybody can give me some hints of where to look, I'd be grateful!

like image 735
GregT Avatar asked May 26 '12 05:05

GregT


1 Answers

I'm experiencing similar behavior with slightly different symptoms. My ajax requests work fine, every second request up to 6 requests, then they all start failing (same url as when working, same payload, etc), but in my case they're not even hitting the server, just stuck in "Pending" in Inspector.

I dont have an answer for you, but to help debug, have you tried chromes net-internals?

Point your browser at:

chrome://net-internals/#sockets

and/or

chrome://net-internals/#events

I see my requests in #sockets go into "active", but never come back, and in #events I can see that the request stalls after the HOST_RESOLVER_IMPL_REQUEST stage.

I'm thinking it could be a resource issue caused by not properly ending the request, but thats just pure speculation.

like image 68
Gene Hallman Avatar answered Nov 09 '22 20:11

Gene Hallman