I'm running a standard installation of Apache 2.4.6 (Amazon) with PHP 5.4.21 using the following configuration for my virtual host:
DirectoryIndex index.php
# ...
FallbackResource /index.php
My index.php
is the epitome of simple:
<?php echo "Hello world";
Accessing http://<server-name>/
mysteriously shows the full page only after five seconds! Any other page has the expected response time (which is fast).
Those five seconds, as I came to find out, are related to the default waiting time of the Keep-Alive
feature; in this case, the last few bytes of the chunked response are not sent until Apache severs the connection after that waiting time. Btw, that also completely ruins any gains that a persistent connection would otherwise give you.
Is this a known bug of Apache or am I missing something extremely obvious here?