Cron is breaking after certain amount of time.[an error occurred while processing this directive]

StackOverflow https://stackoverflow.com/questions/22094411

  •  18-10-2022
  •  | 
  •  

Question

I am working on a script where I need to find if there's and updation on page went on Job URLs in my database. i.e if any job is posted/page updated etc for the pages which have their URLs stored in my database. I am trying to fetch headers of those pages and checking if their last-modified date is more than stored in my database or content-length is more or less than stored in my database (once i fetch the last modified date and content -length and when script run again it compare records for each URL)

The script is working fine on my local but the problem is when it run on bluehost server it is breaking after uncertain record or amount of time and showing error [an error occurred while processing this directive]. (Its when i try to trigger script from my browser.) and when I let it run from Cron it never return anything (I have added a script to send me a mail once the script run fully. with or without errors. I am bypassing the errors if any in-case script is not able to make updation in record (which is around 15 records).

Any one know what could be the error? I was earlier using wget --delete-after command and now using php -f and my cron is on dedicated IP. Execution time could be around 15-20 min.

No correct solution

OTHER TIPS

PHP configs do have provisions for max execution time and also resources they are permitted to use e.g. max memory.

You can set these programatically.

See http://www.php.net/set_time_limit

It is not possible to set the limit beyond the environment max_execution_time - that is set in the php configs.

If you are on a shared server - these limits are often set quite aggressively to ensure resources do not get monopolised.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top