Problems with indexcontent.php or runcronjobs..

Author Message

K259

Wednesday 23 August 2006 12:35:47 am

I run runcronjobs.php which include indexcontent.php. I see in the table ezpending_actions 202 objects waiting to be indexed, but when I run the cronjob, it only index a few. After I ran, I now have 80 objects in ezpending_actions. If I run the cronjob once more, I'm down to 43 objects left...why don't the cronjob index all the objects at once?

K

Marcin Drozd

Wednesday 23 August 2006 8:27:25 am

Hi
Perhaps, max_execution_time (in php.ini) is inadequate (?)

http://ez-publish.pl

Ɓukasz Serwatka

Wednesday 23 August 2006 9:03:12 am

max_execution_time is not respected by CLI PHP, problem might be related to memory. You can run runcronjobs.php script with -dall option for debugging.

$ php runcronjobs.php -dall

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kristof Coomans

Wednesday 23 August 2006 9:04:21 am

This is default behavior, there's a hardcoded limit of 50 in the indexcontent cron script. But I don't know why it is like that.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Claudia Kosny

Wednesday 23 August 2006 11:17:47 am

Hi Kristof

Are you sure about the hardcoded limit? The way I understand the code the script just fetches 50 items each time and processes them before fetching the next chunk of 50 items.
But as it does do that until the query does not return any items anymore, all items in the pending queue should be processed at the end.

Greetings from Luxembourg

Claudia

K259

Wednesday 23 August 2006 2:42:32 pm

Post deleted. Wrong topic.

Kristof Coomans

Wednesday 23 August 2006 11:04:32 pm

Hi Claudia

I should have looked better :-) You're right about the code.

After indexing the first 50 pending actions, these pending actions get removed. But the offset is also increased ( on line 79 on trunk: <i>$offset += $limit;</i> ), so the next query will miss the next first 50 pending actions. Seems to be a bug (<i>http://ez.no/bugs/view/8874</i>).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

K259

Thursday 24 August 2006 12:42:04 am

I can confirm this. Please give information about this, when there is a fix. This error has been since 3.4.x or earlier.

K

Kristof Coomans

Thursday 24 August 2006 7:27:15 am

You can just remove the line with

$offset += $limit;

and it will work fine.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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 19 2025 10:00:32
Script start
Timing: Jan 19 2025 10:00:32
Module start 'layout'
Timing: Jan 19 2025 10:00:32
Module start 'content'
Timing: Jan 19 2025 10:00:32
Module end 'content'
Timing: Jan 19 2025 10:00:32
Script end

Main resources:

Total runtime0.0187 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.0064 590.4141152.6406
Module start 'layout' 0.00640.0032 743.054739.4766
Module start 'content' 0.00960.0069 782.531397.4609
Module end 'content' 0.01650.0022 879.992242.3047
Script end 0.0187  922.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002412.6563140.0002
Check MTime0.00115.9388140.0001
Mysql Total
Database connection0.00084.009310.0008
Mysqli_queries0.003820.361430.0013
Looping result0.00000.112110.0000
Template Total0.00179.310.0017
Template load0.00094.854310.0009
Template processing0.00084.463010.0008
Override
Cache load0.00063.377210.0006
General
dbfile0.002312.186080.0003
String conversion0.00000.052340.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