Forums / General / Problems with indexcontent.php or runcronjobs..

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