Publish objects and memory problem

Author Message

Fabien Mas

Monday 26 November 2007 2:36:51 am

Hi,
I import an CSV file (from the extension importXMLData) into my tree
But I have this error :

<i>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20468 bytes) in /home/web/ezpublishv3/www/lib/ezi18n/classes/ezchartransform.php on line 296
</i>

So I trace my code with memory_get_usage() and I have that function who takes a lot of memory (which is in a foreach)

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

How can I do to reduce the use of memory ?
thx for your help,
Fabien

Fabien Mas

Monday 26 November 2007 7:57:45 am

found this
<i> http://ez.no/community/forum/developer/memory_leak_on_content_publish</i>
It explains some things

So I have rewritten my import function with sessions

But

1) When I build a newsletter with a lot of articles, I have the same problem with memory ..

2) On my local website I have only 64 mb of memory and I have no problem with my import, and on my inline website I have 128 mo of memory and there some problems. The code is the same, what can explain this difference ?

thx, fabien

Xavier Dutoit

Wednesday 28 November 2007 1:16:33 am

What's the differences between your dev and prod machines ?

http://www.sydesy.com

Fabien Mas

Wednesday 28 November 2007 6:10:01 am

Hi Xavier,

thx for your help

Differences between my servers, hard to say
I only know that the prod one has 128 Mo of memory where the dev one has only 64 Mo
I will check this with the administrator

I have downloaded all the files and the database from my prod server to my dev server and I don't have any problem ...

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 21 2025 02:54:46
Script start
Timing: Jan 21 2025 02:54:46
Module start 'layout'
Timing: Jan 21 2025 02:54:46
Module start 'content'
Timing: Jan 21 2025 02:54:46
Module end 'content'
Timing: Jan 21 2025 02:54:46
Script end

Main resources:

Total runtime0.0456 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.0079 589.0547151.2109
Module start 'layout' 0.00790.0133 740.265636.6641
Module start 'content' 0.02120.0219 776.929790.2813
Module end 'content' 0.04320.0024 867.210933.9922
Script end 0.0456  901.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00296.2587140.0002
Check MTime0.00132.7708140.0001
Mysql Total
Database connection0.00122.587310.0012
Mysqli_queries0.013329.265330.0044
Looping result0.00000.063810.0000
Template Total0.00173.810.0017
Template load0.00102.159210.0010
Template processing0.00071.619810.0007
Override
Cache load0.00071.519510.0007
General
dbfile0.012627.692580.0016
String conversion0.00000.096240.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