7

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!

jamesmortensen
  • 33,636
  • 11
  • 99
  • 120
GregT
  • 1,300
  • 3
  • 16
  • 25
  • 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. – GregT May 26 '12 at 05:10
  • Thanks jmort253, it's kind of you to write all that. – GregT May 29 '12 at 19:14
  • Is this in someway related to your question? http://stackoverflow.com/questions/11296036/chrome-not-handling-jquery-ajax-query – Pedro Dec 16 '13 at 17:43
  • Look into this question: http://stackoverflow.com/questions/5585918/what-does-pending-mean-for-request-in-chrome-developer-window/28589598#28589598 The cause could be caused by an extension or security software (e.g. an anti-virus) – Santiago Angel Feb 18 '15 at 17:16

1 Answers1

11

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.

Gene Hallman
  • 381
  • 4
  • 8
  • Excellent, thanks a lot, will try that out. Didn't know about that at all. Incidentally, I see several similar-sounding queries on the Chrome support forums, most unanswered. – GregT Jun 04 '12 at 17:23
  • No problem. For me, the "not properly ending the request" was the cause, and net-internals ended up being perfect for my debugging. – Gene Hallman Jun 05 '12 at 17:45
  • 4
    When I went into chrome://net-internals/#events and went to the URL that was causing issues, I saw this error: `net_error = -20 (ERR_BLOCKED_BY_CLIENT)`. It turns out that it was Adblock Plus causing the issue. Now I'm just worried that this might happen to my end users if they have Adblock Plus installed. – sffc Jul 10 '13 at 07:15