Stanislav Kuhn wrote: > I've got a processing script which takes long time to finish. The script > includes several others and is ran from command line(by cron). I've sent > phpinfo from inside of processing to my email, here is the important part > max_execution_time => 1800 => 0 So your php.ini has no time limit (0) and your .htaccess file (or some script settings before you do phpinfo()) is changing it to 1800, which is 30 minutes. > max_input_time => 120 => 120 > memory_limit => 64M => 64M > > I'm setting 1800 inside a script and 0 exec time is by default... anyway I > have tried to set it to whatever and wherever ;o) Script always terminates > and that is strange not exactly at same time... it's aprox from 6 to 10 > minutes and not in same place (in any of included script). And error > message > always displays 30 seconds... I have tried to grep a source for ini_set as > well, nothing important anywhere in the code. Note that time PHP spends waiting for stream input, system calls, database queries etc does *NOT* count. So it's quite possible that: You are not executing phpinfo() under the same environment as your real script. Your code does a ton of db queries or system calls or waiting for streams, and PHP only "counts" 30 seconds of the 6 to 10 minutes being spent. The amount of time PHP spends waiting for system calls, streams, and db queries is highly variable, and accounts for the 6 to 10 minutes range -- as well as the fact that PHP dies out at seemingly random different places in your source. > PHP Fatal error: Maximum execution time of 30 seconds exceeded in > .....php > on line 130 > > Has somebody seen something like this or has an idea what's going on > there? At the *TOP* of your real script, use http://php.net/error_log to log ini_get('max_execution_time') and see what you've got. Or try to run your phpinfo() test in exactly the same manner as your cron job. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php