title: Page intermittently takes 2 minutes to load
body: <p>We're getting ready to switch our ASP.Net application to a new web farm environment. However, our testing has revealed an intermittent problem whereby a page takes up to 2 minutes to finish loading, where normally it would take less than 2 seconds. Browser diagnostic tools (like Firebug) show that the delay occurs when the page is loading the jQuery library and our style sheet. I don't really think there is a problem with those files, but I really don't know what the problem is so I can't be sure.</p>
  
  <p>Here's some more information about our environment. Our web servers are running Windows Server 2008 (64-bit), IIS 7, .Net 3.5. We're using a Cisco CSS load balancer configured to send traffic to whichever server currently has the least load (i.e. the load balancer is not using sticky sessions). The web servers are configured to use a third server as the session store (3rd server is running ASP.Net Session State Service).</p>
  
  <p>Any ideas about what could be causing the delay?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong>: </p>
  
  <p>Thanks for the responses thus far. In answer to a few suggestions given, I can definitely say that the problem is not due to initial page load or any heavy 3rd party controls. We can hit the page up to 100 times in a row with no delay, and then all of a sudden the delay occurs on the 101st time we hit it. Also, this may be an important clue... when the delay occurs, I can immediately hit reload on my browser and the page will return to it's speedy load time... would that point more towards a network/DNS issue?</p>
  
  <hr>
  
  <p><strong>UPDATE 2</strong>:</p>
  
  <p>It seems like the error only ever occurs while downloading the jQuery library. I'm sure that most of the time it's picking it up from the local cache, but even if the local copy expired and it downloads a new copy, it shouldn't take 2 minutes to download a minified jQuery library that is only ~56KB in size.</p>
  
  <hr>
  
  <p><strong>UPDATE 3</strong>:</p>
  
  <p>After trying Fiddler (for the first time), I was able to reproduce the problem. This time the delay occurred while downloading an image file from the server. And, IT OCCURRED WHILE RUNNING ON OUR OLD SERVER - NOT THE WEB FARM! Here's what fiddler said about that file. Any ideas on what conclusions to draw from this?</p>
  
  <pre><code>Request Count:  1
  Bytes Sent:     753
  Bytes Received: 242
  
  ACTUAL PERFORMANCE
  ClientConnected:    19:53:15:5921
  ClientDoneRequest:  19:53:15:8421
  Gateway Determination:  0ms
  DNS Lookup:         0ms
  TCP/IP Connect:     31ms
  ServerGotRequest:   19:55:25:7640
  ServerBeginResponse:    19:55:25:7952
  ServerDoneResponse: 19:55:25:7952
  ClientBeginResponse:    19:55:25:7952
  ClientDoneResponse: 19:55:25:8108
  
      Overall Elapsed:    00:02:10.2187500
  
  RESPONSE CODES
  HTTP/304:   1
  
  RESPONSE BYTES (by Content-Type)
  ~headers:   242
  </code></pre>
  
  <p>AND the response headers are as follows:</p>
  
  <pre><code>HTTP/1.1 304 Not Modified
  Cache-Control: max-age=2592000
  Last-Modified: Tue, 04 Aug 2009 05:11:20 GMT
  Accept-Ranges: bytes
  ETag: "ed5bca0c214ca1:f3a"
  Server: Microsoft-IIS/6.0
  X-Powered-By: ASP.NET
  Date: Tue, 08 Dec 2009 02:55:37 GMT
  </code></pre>