Forums / Developer / Publish objects and memory problem

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 ...