title: apache requests very slow after using ProxyPass
body: <p>So I'm running Tomcat(8.0) behind Apache(2.4) on Windows Server 2012 and using ProxyPass to pass through all traffic. Everything works fine, but whenever I do nothing for 60 seconds, and then hit the server again, i get a 8-20 second delay, like apache is creating a new process to handle the request.</p>
  
  <p>My configuration is pretty much the default that comes with Apache Haus, with the addition of the proxy stuff, which I believe is the culprit:</p>
  
  <pre><code>ProxyPass         /static/ !
  ProxyPass         /  http://localhost:8088/
  ProxyPassReverse  /  http://localhost:8088/
  </code></pre>
  
  <p>I added the </p>
  
  <blockquote>
    <p>/static/ !</p>
  </blockquote>
  
  <p>exemption to see if same problem would happen on static files being served, and apparently it does. I further narrowed it down by commenting out all the ProxyPass stuff, and verifying my static file always loads fast. Then i uncommented ProxyPass stuff, and only requested my static file, and it again always returned fast. But once I hit a URL that takes me through the proxy, wait a minute, then hit it again, something goes horribly wrong. Below is network monitor output for two requests, first of the static file being requested a second time after a 1 minute delay <strong>before</strong> proxy use, the other after the proxy had been used twice with delay between proxy requests.</p>
  
  <pre><code>3501   4:17:48 PM 10/21/2015   104.2752287   httpd.exe   HTTP   HTTP:Request, GET /static/index.html 
  3502   4:17:48 PM 10/21/2015   104.2760830   httpd.exe   HTTP   HTTP:Response, HTTP/1.1, Status: Not modified, URL: /static/index.html 
  </code></pre>
  
  <p>After (8 seconds to return):</p>
  
  <pre><code>24232   4:26:13 PM 10/21/2015   608.7355960   httpd.exe   HTTP   HTTP:Request, GET /static/index.html 
  24775   4:26:20 PM 10/21/2015   616.0896861   httpd.exe   HTTP   HTTP:Response, HTTP/1.1, Status: Not modified, URL: /static/index.html 
  </code></pre>
  
  <p>I'm noticing more of this SynReTransmit line after it was initially broken, not sure if it's relevant:</p>
  
  <pre><code>24226   4:26:13 PM 10/21/2015   608.7286692   httpd.exe   TCP   TCP:[SynReTransmit #24107]Flags=......S., SrcPort=61726, DstPort=HTTP(80), PayloadLen=0, Seq=1157444168, Ack=0, Win=8192 ( Negotiating scale factor 0x2 ) = 8192
  </code></pre>
  
  <p>But basically every call, be it to static file or over proxy, if it's been over 60 seconds since the last call, will take forever to get a response!</p>
  
  <p>Any ideas?</p>
  
  <p>UPDATE:
  I was running a slightly older version of Apache, 2.4.12, but updating to latest, 2.4.17, didn't fix it. I've tried all sorts of keepalive settings, nothing seems to help. On another forum i was directed at this apache dev thread which has a proposed patch for what sounds like a similar issue, guess I'll wait for an apache update:</p>
  
  <p><a href="http://marc.info/?l=apache-httpd-dev&amp;m=144543644225945&amp;w=2" rel="noreferrer">http://marc.info/?l=apache-httpd-dev&amp;m=144543644225945&amp;w=2</a></p>