title: Sporadic 502 error with gwt rpc calls
body: <p>I have a GWT application that is giving sporadic 502 errors all of a sudden. I have managed to replicate it by opening multiple connections to the application. Eventually I get a 502 error and the response headers for look as follows:</p>
  
  <pre><code>Server: squid/2.6.STABLE5
  Date: Fri, 19 Aug 2011 12:08:03 GMT
  Content-Type: text/html
  Content-Length: 1014
  Expires: Fri, 19 Aug 2011 12:08:03 GMT
  X-Squid-Error: ERR_ZERO_SIZE_OBJECT 0
  X-Cache: MISS from sentinel.bsgza.bsg.co.za
  X-Cache-Lookup: MISS from sentinel.bsgza.bsg.co.za:3128
  Via: 1.0 sentinel.bsgza.bsg.co.za:3128 (squid/2.6.STABLE5)
  Connection: close
  </code></pre>
  
  <p>The response headers for the successful rpc calls look like this:</p>
  
  <pre><code>Date: Fri, 19 Aug 2011 13:04:37 GMT
  Server: Apache/2.2.14 (Ubuntu)
  Content-Encoding: gzip
  Content-Disposition: attachment
  Content-Length: 249
  Content-Type: application/json;charset=utf-8
  X-Cache: MISS from sentinel.bsgza.bsg.co.za
  X-Cache-Lookup: MISS from sentinel.bsgza.bsg.co.za:3128
  Via: 1.0 sentinel.bsgza.bsg.co.za:3128 (squid/2.6.STABLE5)
  Connection: keep-alive
  </code></pre>
  
  <p>We have been able to repeat this on a local server too so it is not a network issue</p>