So, I am running Tomcat (8.0) for Apache (2.4) on Windows Server 2012 and using ProxyPass to go through all the traffic. Everything works fine, but whenever I do nothing for 60 seconds and then hit the server again, I get a delay of 8-20 seconds, for example, apache creates a new process to process the request.
My configuration is pretty much the default one that comes with Apache Haus, with the addition of a proxy file, which I believe is the culprit:
ProxyPass /static/ !
ProxyPass / http:
ProxyPassReverse / http:
I added
/ static /!
to see if the same problem will occur when serving static files, and apparently this is the case. I also narrowed it down by commenting on all ProxyPass stuff, and checking my static file always loads quickly. Then I uncommented the ProxyPass stuff and only requested my static file and it always returned quickly again. But as soon as I hit the URL that takes me through the proxy server, wait a minute and then hit it again, something will go horribly wrong. Below is the output of the network monitor for two requests, the first of the static files is requested the second time after the delay 1 minute before , and the second after the proxy server was used twice with a delay between proxy requests.
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
After (8 seconds to return):
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
SynReTransmit , , , :
24226 4:26:13 PM 10/21/2015 608.7286692 httpd.exe TCP TCP:[SynReTransmit
, -, 60 , !
?
UPDATE:
Apache, 2.4.12, 2.4.17 . keepalive, . apache dev, , , , apache:
http://marc.info/?l=apache-httpd-dev&m=144543644225945&w=2