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 have a long script to run, as cron, in PHP. I'm calling the script locally using wget from a cron job, but it fails after 15 minutes.

In apache2.conf, I have configured Timeout to 12000 In php.ini, I have configured max_execution_time to 72000

Despite those settings, wget fails after exactly 15 minutes...

Is there any other place where I need to change a setting ?

I'm using Ubuntu 12.04 with all packages up to date (Apache 2.2, PHP 5.3).

Thank you

share|improve this question
    
Error message shown by wget: Read error (Connection timed out) in headers. –  Jonathan May 3 '12 at 11:29
add comment

1 Answer 1

up vote 0 down vote accepted

Why wget?...what this script is actually doing? When your cron gets executed, have you checked apache/php threads in memory?

share|improve this answer
    
The script is in PHP, I'm passing some arguments through the page address. It's browsing through 1 TB of picture files and creating categories and tags for each. Memory seems to be all right, I'm running Munin and it's barely starting to swap. –  Jonathan May 3 '12 at 11:28
    
You pointing WGET helped a lot - it has a default timeout of 900 seconds. wget -T allows the user to extend the duration before a timeout. Thank you ! –  Jonathan May 3 '12 at 11:45
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.