title: request stalled for a long time occasionally in chrome
body: <p>Ajax request occasionally stalled for a long time in chrome.</p>
  
  <p>I finally managed to reproduced it and save all related data necessary to post here if anyone could help me out.</p>
  
  <p>The timeline from Chrome Dev Tool shows the request stalled for 42.62s as the following screen capture shows:
  <img src="https://i.stack.imgur.com/yFaPS.jpg" alt="enter image description here"></p>
  
  <p>and within the <code>chrome://net-internals/#events</code> (for the events log please head to the end) page I found the most time is cost by two events:</p>
  
  <ul>
  <li>+HTTP_TRANSACTION_READ_HEADERS  [dt=21301]</li>
  <li>+HTTP_TRANSACTION_READ_HEADERS  [dt=21304]</li>
  </ul>
  
  <p>both get <code>ERR_CONNECTION_RESET</code>.</p>
  
  <p><img src="https://i.stack.imgur.com/7zphy.jpg" alt="enter image description here"></p>
  
  <p>I think the error is the reason why the request stalled for so long.</p>
  
  <p>Any one could explain the errors?</p>
  
  <p>FOLLOWING IS THE EVENTS LOG FOR THE REQUEST, I also export the full events as json you can get from <a href="https://gist.githubusercontent.com/wayou/39772215d075c80d643a/raw/9c91463f22016d20c90de19e77ae3e4f302e0769/gistfile1.txt" rel="noreferrer">here</a> then restore within the Chrome <code>chrome://net-internals/#events</code> page. note the request url is internal so maybe cant access from public network:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>193486: URL_REQUEST
  http://qa.tieba.baidu.com/release/getReleaseHistory?projectId=fum1.0.593
  Start Time: 2015-01-02 17:51:05.323
  
  t=    1 [st=    0] +REQUEST_ALIVE  [dt=42741]
  t=    1 [st=    0]    URL_REQUEST_DELEGATE  [dt=0]
  t=    1 [st=    0]   +URL_REQUEST_START_JOB  [dt=42740]
                        --&gt; load_flags = 339804160 (BYPASS_DATA_REDUCTION_PROXY | MAYBE_USER_GESTURE | REPORT_RAW_HEADERS | VERIFY_EV_CERT)
                        --&gt; method = "GET"
                        --&gt; priority = "LOW"
                        --&gt; url = "http://qa.tieba.baidu.com/release/getReleaseHistory?projectId=fum1.0.593"
  t=    2 [st=    1]      URL_REQUEST_DELEGATE  [dt=0]
  t=    2 [st=    1]      HTTP_CACHE_GET_BACKEND  [dt=0]
  t=    2 [st=    1]      HTTP_CACHE_OPEN_ENTRY  [dt=0]
  t=    2 [st=    1]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0]
  t=    2 [st=    1]      HTTP_CACHE_READ_INFO  [dt=0]
  t=    2 [st=    1]      URL_REQUEST_DELEGATE  [dt=0]
  t=    2 [st=    1]     +HTTP_STREAM_REQUEST  [dt=2]
  t=    4 [st=    3]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                            --&gt; source_dependency = 193488 (HTTP_STREAM_JOB)
  t=    4 [st=    3]     -HTTP_STREAM_REQUEST
  t=    4 [st=    3]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=0]
  t=    4 [st=    3]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                            --&gt; GET /release/getReleaseHistory?projectId=fum1.0.593 HTTP/1.1
                                Host: qa.tieba.baidu.com
                                Connection: keep-alive
                                Accept: application/json, text/plain, */*
                                User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
                                Referer: http://qa.tieba.baidu.com/project/
                                Accept-Encoding: gzip, deflate, sdch
                                Accept-Language: en-US,en;q=0.8
                                Cookie: [268 bytes were stripped]
  t=    4 [st=    3]     -HTTP_TRANSACTION_SEND_REQUEST
  t=    4 [st=    3]     +HTTP_TRANSACTION_READ_HEADERS  [dt=21301]
  t=    4 [st=    3]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=21301]
                            --&gt; net_error = -101 (ERR_CONNECTION_RESET)
  t=21305 [st=21304]        HTTP_TRANSACTION_RESTART_AFTER_ERROR
                            --&gt; net_error = -101 (ERR_CONNECTION_RESET)
  t=21305 [st=21304]     -HTTP_TRANSACTION_READ_HEADERS
  t=21305 [st=21304]     +HTTP_STREAM_REQUEST  [dt=3]
  t=21307 [st=21306]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                            --&gt; source_dependency = 193494 (HTTP_STREAM_JOB)
  t=21308 [st=21307]     -HTTP_STREAM_REQUEST
  t=21308 [st=21307]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=3]
  t=21308 [st=21307]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                            --&gt; GET /release/getReleaseHistory?projectId=fum1.0.593 HTTP/1.1
                                Host: qa.tieba.baidu.com
                                Connection: keep-alive
                                Accept: application/json, text/plain, */*
                                User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
                                Referer: http://qa.tieba.baidu.com/project/
                                Accept-Encoding: gzip, deflate, sdch
                                Accept-Language: en-US,en;q=0.8
                                Cookie: [268 bytes were stripped]
  t=21311 [st=21310]     -HTTP_TRANSACTION_SEND_REQUEST
  t=21311 [st=21310]     +HTTP_TRANSACTION_READ_HEADERS  [dt=21304]
  t=21311 [st=21310]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=21304]
                            --&gt; net_error = -101 (ERR_CONNECTION_RESET)
  t=42615 [st=42614]        HTTP_TRANSACTION_RESTART_AFTER_ERROR
                            --&gt; net_error = -101 (ERR_CONNECTION_RESET)
  t=42615 [st=42614]     -HTTP_TRANSACTION_READ_HEADERS
  t=42615 [st=42614]     +HTTP_STREAM_REQUEST  [dt=12]
  t=42627 [st=42626]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                            --&gt; source_dependency = 193498 (HTTP_STREAM_JOB)
  t=42627 [st=42626]     -HTTP_STREAM_REQUEST
  t=42627 [st=42626]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=2]
  t=42627 [st=42626]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                            --&gt; GET /release/getReleaseHistory?projectId=fum1.0.593 HTTP/1.1
                                Host: qa.tieba.baidu.com
                                Connection: keep-alive
                                Accept: application/json, text/plain, */*
                                User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
                                Referer: http://qa.tieba.baidu.com/project/
                                Accept-Encoding: gzip, deflate, sdch
                                Accept-Language: en-US,en;q=0.8
                                Cookie: [268 bytes were stripped]
  t=42629 [st=42628]     -HTTP_TRANSACTION_SEND_REQUEST
  t=42629 [st=42628]     +HTTP_TRANSACTION_READ_HEADERS  [dt=112]
  t=42629 [st=42628]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=112]
  t=42741 [st=42740]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                            --&gt; HTTP/1.1 200 OK
                                Date: Fri, 02 Jan 2015 09:51:48 GMT
                                Content-Type: application/json; charset=UTF-8
                                Transfer-Encoding: chunked
                                Connection: keep-alive
                                Cache-Control: no-cache
                                tracecode: 31079600320335034634010217
                                tracecode: 31079600320537995786010217
                                Server: Apache
  t=42741 [st=42740]     -HTTP_TRANSACTION_READ_HEADERS
  t=42741 [st=42740]      HTTP_CACHE_WRITE_INFO  [dt=0]
  t=42741 [st=42740]      HTTP_CACHE_WRITE_DATA  [dt=0]
  t=42741 [st=42740]      HTTP_CACHE_WRITE_INFO  [dt=0]
  t=42741 [st=42740]      URL_REQUEST_DELEGATE  [dt=0]
  t=42741 [st=42740]   -URL_REQUEST_START_JOB
  t=42741 [st=42740]    URL_REQUEST_DELEGATE  [dt=0]
  t=42741 [st=42740]    HTTP_TRANSACTION_READ_BODY  [dt=0]
  t=42741 [st=42740]    HTTP_CACHE_WRITE_DATA  [dt=0]
  t=42741 [st=42740]    HTTP_TRANSACTION_READ_BODY  [dt=0]
  t=42741 [st=42740]    HTTP_CACHE_WRITE_DATA  [dt=0]
  t=42742 [st=42741] -REQUEST_ALIVE</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>EDIT:related issue</strong> <a href="https://code.google.com/p/chromium/issues/detail?id=447463" rel="noreferrer">Issue 447463:   Chrome-network: Long delay before RST message on stale sockets results in slow page loads.</a></p>