tags:

views:

27

answers:

1

I'm testing a web service that is running on Apache 2.2 and PHP 5. Using curl to send requests I see that the time spent is always 2 minutes. I'm only getting partial returns from the service and I think something is configured to stop after 2 minutes.

A search of httpd.config and php.ini for the string 120 turned up nothing.

What could be set to 2 minutes to produce this behavior?

+1  A: 

PHP caps all scripts to a time limit, which is configurable at runtime (see set_time_limit, for example) or through php.ini (max_execution_time directive). That's likely what's got you - your time limit is set to two minutes.

Ryan Ballantyne
Each call to set_time_limit sets the counter to 0. So if you have a loop, and you call set_time_limit(60) at the head of the loop, you are effectively limit the time limit of each loop iteration to 60 seconds. (Of course that's a basic example)
Josh