0

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

  • Error message shown by wget: Read error (Connection timed out) in headers. – Jonathan May 3 '12 at 11:29
0

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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