Re: Script timeout
| From: | Julian Wood | Date: | Thu, 23 Aug 2001 16:38:13 +0000 |
| Subject: | Re: Script timeout | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64129@lists.php.net to get a copy of this message | ||
Well just to follow up, Apache was the culprit. There is an Apache timeout directive that was set to 300 s that I somehow missed on my first glance.
The things that timeout, as far as I know, are PHP, Apache, and several commands within PHP (such as fsockopen()). The Apache directive is called Timeout, conveniently enough. It actually indicates the amount of time between successive TCP packet transmissions before a timeout occurs, which threw me for quite a loop. I could make a script which took 20 minutes to complete and get no timeouts anywhere, so I was convinced there was something wrong with my code. The difference was that this 20 min script outputted data along the way, so no timeouts ever occurred. The problem script didn't output anything until it was finished processing. Christian hit it on the nail. You can set the php timeout within the apache config file like so: php_value max_execution_time 120. This time is not real time, but the time the script actually gets access to cpu resources, or something like that. In my case, a setting of 30 was about 300 s.
I don't know if the browser itself will ever timeout as long as it makes the initial handshake.
J
On Thursday, August 23, 2001, at 09:43 AM, Johnson, Kirk wrote:
-- Julian Wood Programmer/Analyst University of CalgaryWhy timeout at 300s instead of the 30s or the 12000s whichCan anybody point me to information on all the possible HTTP timeouts there are (Apache, browser, ???), or care to discuss it here? We occasionally see "timeouts" that are not due to PHP, and I'm wondering where they are coming from. TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netare the only two values reported?Looks like some HTTP timeout, i.e. either Apache or the browser is getting bored. Try outputting something from time to time.