cronjob resource hog

Author Message

Andre Felipe Machado

Monday 31 October 2005 2:41:37 am

Hello,
The runcronjob is depleting resources at my machine.
It exahusts ram and maximum open files limits.
The site syndicates some rss external feeds and then links are included. So, the site "grows".
At the next cronjob, the additional links and pages are checked and memory is filled, maximum open files are reached, site crashes with Ezpublish fatal error or error 403, forbidden access(!), database acess fails (unacessible mysql table files).
Is there a way to optimize the cronjobs?
Today, its code imposes a practical limit to the site size, number of pages and number of links.
What can I do?
Regards.
Andre Felipe

---
A Debian user never dies. Issues a last command:
shutdown -h now

http://www.techforce.com.br

Andre Felipe Machado

Wednesday 02 November 2005 7:30:20 am

Hello
Found the culprit and an ugly workaround.
The cronjob does not scale to bigger sites.
It starts linkchecking and this process is slow, because each link must connect or time out.
At my site, each instance of linkcheck use almost 6 hours to complete.
As each instance is already a resource hog on its own, 6 instances running simultaneausly exhausts system resources.
I had to reconfigure cronjob from hourly to at each 6 hours...
The rss export import are now very bad. Workflow....
A more reasonable solution could be using independent link check cron job from the other tasks.
The link check could run once a day.
Other solution could be check many links in parallel mode.
Regards.
Andre Felipe

---
A Debian user never dies. Issues a last command:
shutdown -h now

http://www.techforce.com.br

Mark Marsiglio

Wednesday 02 November 2005 10:10:12 am

I removed linkcheck from the list of jobs run on a regular basis in cronjobs.ini to solve the same problem.

I am in the process of creating a separate cron job to run only link check once a week. Have not got it done yet though...

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Kåre Køhler Høvik

Thursday 03 November 2005 12:15:33 am

Checking all links will always be a heavy operation for the system. It's not recommended to run it as part of the normal cronjobs. Use the cronjob-part to run the linkcheck as separate process : http://ez.no/products/ez_publish_cms/documentation/installation/the_cronjob_script

Kåre Høvik

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:02:53
Script start
Timing: Jan 18 2025 16:02:53
Module start 'layout'
Timing: Jan 18 2025 16:02:53
Module start 'content'
Timing: Jan 18 2025 16:02:53
Module end 'content'
Timing: Jan 18 2025 16:02:53
Script end

Main resources:

Total runtime0.0159 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7891152.6094
Module start 'layout' 0.00580.0021 740.398439.4297
Module start 'content' 0.00790.0057 779.828193.2734
Module end 'content' 0.01360.0022 873.101634.3047
Script end 0.0158  907.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.5014140.0002
Check MTime0.00127.7775140.0001
Mysql Total
Database connection0.00116.679310.0011
Mysqli_queries0.00169.768030.0005
Looping result0.00000.088610.0000
Template Total0.001811.210.0018
Template load0.00106.132410.0010
Template processing0.00084.921610.0008
Override
Cache load0.00074.335710.0007
General
dbfile0.00148.814180.0002
String conversion0.00000.057140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs