Forums / Developer / memory leak on content/publish ?

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.

eZ debug

Timing: Jan 18 2025 11:39:08
Script start
Timing: Jan 18 2025 11:39:08
Module start 'content'
Timing: Jan 18 2025 11:39:09
Module end 'content'
Timing: Jan 18 2025 11:39:09
Script end

Main resources:

Total runtime0.9279 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 589.6484181.6719
Module start 'content' 0.00940.7643 771.3203587.3594
Module end 'content' 0.77370.1541 1,358.6797358.2578
Script end 0.9278  1,716.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4770210.0002
Check MTime0.00160.1749210.0001
Mysql Total
Database connection0.00190.201710.0019
Mysqli_queries0.850691.67212020.0042
Looping result0.00210.22422000.0000
Template Total0.889795.920.4449
Template load0.00200.216220.0010
Template processing0.887795.674620.4439
Template load and register function0.00020.021610.0002
states
state_id_array0.00150.163410.0015
state_identifier_array0.00180.193220.0009
Override
Cache load0.00170.1783280.0001
Sytem overhead
Fetch class attribute can translate value0.00430.459340.0011
Fetch class attribute name0.00080.084960.0001
XML
Image XML parsing0.00100.105140.0002
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00180.1916280.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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