I'm trying to understand the timeout value in apache since I want to make my server run very fast. On my local server, I tried using an apache timeout of 5 seconds. I then attempted to execute the following PHP code as an actual script.
<?php
echo "EXEC...";
sleep(12);
echo "EXEC OK";
echo time();
?>
As expected it took time to load, but the script finished after 12 seconds as instructed in the script code, however the apache timeout is 5 seconds. This doesn't make sense.
So then I thought if the timeout value didn't stop my script from executing completely, then I should be able to get away with setting the timeout to maybe even 3 seconds at most considering the connection time to my site is well under one second. I think I can safely assume that 99.9% of the people requesting my site will be able to have it completely loaded in one second.
Is there anything I should watch out for before setting the timeout value to a couple seconds?