View Full Version : PHP Request Time-out

04-21-2007, 08:40 AM
I am running a simple PHP script that downloads a list of items using file_get_contents(). All has been fine until I recently installed Zend Core 2.0 with PHP 5.2.1. Now not but a few minutes into running through that list the PHP script suddenly stops everything with the message "<h1>Request Time-out</h1>" and no other explanation. I know this text doesn't show up anywhere in any script in the server's directory so it must be header information received. I can't figure out why a file_get_contents() call that receives a time-out header would make my script terminate like this.

Any ideas?

04-21-2007, 02:43 PM
That means that your query has taken too long. Either you have a never ending loop or you have to change your settings. I think you will be able to do it in php.ini though I'm not sure. Basically the server terminated the script because it took too long to process.

04-21-2007, 04:10 PM
My query timed out? I am not running a MySQL query and the PHP max execution and input time is set to 8 hours. I tried switching to using cURL and the same thing happens. The loop ends when all the files have been downloaded. This Request Time-out message is showing after only a couple of minutes. I have no idea what setting I would need to change.

04-21-2007, 06:50 PM
Also, if the server terminated the script because it took to long to process I would have gotten a "fatal error max execution time exceeded on line whatever" style error which would have explained the problem rather straightforwardly. The simple "Request Time-out" tells me absolutely nothing of where the problem lies or what triggered it exactly.

04-22-2007, 04:04 AM
Have you tried digging around in your server's error logs?

04-23-2007, 08:45 PM
Have you tried digging around in your server's error logs?

Yeah, and unfortunately that didn't produce any thing.

Come to find out there is a bug (?) in Zend Core 2.0 in which the usage of the function sleep() cannot set a script to sleep for longer than the integer value of "RequestTimeout" as set in "fastcgi.conf". I have reported this to Zend but so far they have no comment.