Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am testing a page generated by a script that performs some operations and redirects to another script. It times out at ~ 60 seconds although the max_execution_time is set to 300.

Other revelant settings could be:

mysql.connect_timeout   60
default_socket_timeout  60

Would these be causing this behavior?

share|improve this question
add comment

4 Answers

In PHP did you use the function

share|improve this answer
1  
FYI - this command is analogous to setting max_execution_time in php.ini, which the OP has already done. –  EEAA Sep 25 '10 at 14:52
    
max_execution_time is a php.ini directive as you said, but I suggest to try the set_time_limit() at the top of the PHP script to ensure there is no configuration issue. –  ring0 Sep 25 '10 at 15:01
2  
Sure, well a check of phpinfo() would verify whether or not max_execution_time is being set correctly by the php.ini. –  EEAA Sep 25 '10 at 15:06
add comment

It's also possible that your PHP configuration could be overriding it. For example, I once had set php_value max_execution_time 600 in my Apache VirtualHost configuration on the <Directory> of my Drupal 5 install, but a file in Drupal 5 core has a line that containss max_execution_time 240. Because the Drupal code was processed later, it overrode the Apache configuration option.

The solution for me to "force" my declaration was to set it in Apache as php_admin_value max_execution_time 600. The php_admin_value means that PHP scripts cannot change the value you set it to.

share|improve this answer
add comment

Is it possibly hitting the memory_limit set in php.ini? Run top while the script is running and see if its memory consumption increases to near the set limit before timing out.

I would highly doubt that the current settings for mysql.connect_timeout and default_socket_timeout would be causing any problems.

Also, just to make sure, you did restart apache after making the php.ini changes, correct?

share|improve this answer
add comment

This could have been re-configured in a .htaccess file somewhere within the site (or superior folders).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.