memory leak on content/publish ?

Author Message

*- pike

Thursday 27 December 2007 4:13:50 am

nope .. sorry.
haven't been able to locate the problem, yet :-(

$2c,
*pike

---------------
The class eZContentObjectTreeNode does.

Olivier Versanne

Tuesday 23 June 2009 6:26:34 am

Hi!

And now? I'm currently having the same problem and I'm loosing a lot of hair to fix this problem...

André R.

Tuesday 23 June 2009 7:03:32 am

See the other thread:
http://ez.no/developer/forum/developer/how_to_build_an_update_cli_script_without_memory_problem#msg187431

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Olivier Versanne

Tuesday 23 June 2009 7:18:00 am

Thanks, but I'm already implementing this solution. That works for a lot of things, but for attribute storage of an object:

$dataMap = $object->dataMap();
[...] 
$dataMap[$key]->setAttribute( $dataType, $content );
$dataMap[$key]->store(); // here

and for the publication of an object:

eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $object->attribute( 'id' ), 'version' => $object->attribute( 'current_version' ) ) );

that don't work.

*- pike

Tuesday 23 June 2009 12:59:15 pm

Hi

Just to let you know, I didn't find a solution (or where the leak was) at the time. I haven't tested it lately. We upgraded to 4.x, but it wouldn't surprise me if it still happened. And your post is suggesting $attribute->store() has a similar leak ?

You can test that by hardcoding some debug in moduleOperationInfo::executeBody

Andre R. - that's a nice link.

unset( $GLOBALS['eZContentObjectContentObjectCache'] );    
unset( $GLOBALS['eZContentObjectDataMapCache'] );    
unset( $GLOBALS['eZContentObjectVersionCache'] );    
unset( $GLOBALS['eZContentClassAttributeCache'] );    
unset( $GLOBALS["eZUserObject_".$node->ContentObjectID] );  

I'm not sure if I checked the last one - i did inspect the others, and they didnt make much difference. The memory was lost somewhere else.

*-pike

---------------
The class eZContentObjectTreeNode does.

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:07:37
Script start
Timing: Jan 18 2025 16:07:37
Module start 'layout'
Timing: Jan 18 2025 16:07:37
Module start 'content'
Timing: Jan 18 2025 16:07:37
Module end 'content'
Timing: Jan 18 2025 16:07:37
Script end

Main resources:

Total runtime0.7589 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.5703152.6250
Module start 'layout' 0.00590.0026 742.195339.9063
Module start 'content' 0.00850.7492 782.1016581.9141
Module end 'content' 0.75770.0012 1,364.015614.2891
Script end 0.7589  1,378.3047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4375160.0002
Check MTime0.00140.1888160.0001
Mysql Total
Database connection0.00090.125010.0009
Mysqli_queries0.708493.3523640.0111
Looping result0.00050.0716620.0000
Template Total0.727295.820.3636
Template load0.00180.232720.0009
Template processing0.725495.591520.3627
Template load and register function0.00020.028810.0002
states
state_id_array0.00090.117410.0009
state_identifier_array0.00090.113620.0004
Override
Cache load0.00150.1962280.0001
Sytem overhead
Fetch class attribute can translate value0.00150.202430.0005
Fetch class attribute name0.00120.163260.0002
XML
Image XML parsing0.00080.108330.0003
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00070.0978170.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs