On Wednesday 15 May 2002 09:50, Lars Aronsson wrote:
Response times above some limit (say, 30, 60 or 120 seconds) can be defined as absurdly long, because the user will have left for other websites and is no longer waiting for the response. Instead of spending more system resources (CPU cycles and allocated memory) on these requests, it would be better to set a hard time out (in PHP or Apache) and return an error message that says "sorry for the delay". This would free up system resources that can be better used to serve other requests.
In http://www.php.net/manual/en/function.set-time-limit.php, the PHP function set_time_limit() is said to have a default of 30 seconds, unless the configuration file has defined max_execution_time. Will calling this function set the time limit for the current request only, or set a permanent value for the server? What happens when PHP execution times out? Is the connection to the client abruptly closed? Or is an error message returned? Does an error message appear in the log file? I haven't seen any timeouts of this kind.
PHP aborts the script, outputs an error message saying it timed out, and closes the connection.
phma