ezpersistentobject memory error updating class attribute with +150000 objects stored

Author Message

Hugo Sandoval

Wednesday 04 August 2010 1:45:30 pm

Hello.

When i try to delete, modify or add an attribute to a class with more than 150K object published, the ezpublish fatal error appears. The var/log/error.log output is:

PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16777216 bytes) in /srv/www/htdocs/kernel/classes/ezpersistentobject.php on line 906, referer: http://localhost/index.php/ezwebin_site_admin/class/edit/45/(language)/esl-ES

I'd make some queries taken from debug output, directly in mysql and it's return the 150K records in 1 single select sentence.

******

ezpublish: 4.3

mysql: 5.1.46-log SUSE

.·. .·. .·. .·. .·. .·. .·.
http://www.softwarelibre.com.ve/

André R.

Thursday 05 August 2010 1:28:12 am

This is not supported from the web ui currently.

You'll need to use a script to accomplish changing class schema on so many objects.
In 4.3 and up you can use an extension called ezscriptmonitor: http://projects.ez.no/ezscriptmonitor

(you can use it with older 4.x ezp versions as well, but then you need to use version 0.3 of it)

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

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 02:05:13
Script start
Timing: Jan 18 2025 02:05:13
Module start 'layout'
Timing: Jan 18 2025 02:05:13
Module start 'content'
Timing: Jan 18 2025 02:05:14
Module end 'content'
Timing: Jan 18 2025 02:05:14
Script end

Main resources:

Total runtime0.7545 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 588.3984152.6875
Module start 'layout' 0.00950.0046 741.085939.5547
Module start 'content' 0.01410.7385 780.6406533.3750
Module end 'content' 0.75270.0018 1,314.015612.0625
Script end 0.7544  1,326.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4798160.0002
Check MTime0.00150.1971160.0001
Mysql Total
Database connection0.00100.137610.0010
Mysqli_queries0.701292.9415550.0127
Looping result0.00060.0769530.0000
Template Total0.719595.420.3598
Template load0.00200.262420.0010
Template processing0.717595.101420.3588
Template load and register function0.00020.029010.0002
states
state_id_array0.00090.117310.0009
state_identifier_array0.00110.145520.0005
Override
Cache load0.00170.2200180.0001
Sytem overhead
Fetch class attribute can translate value0.00070.095820.0004
Fetch class attribute name0.00130.170040.0003
XML
Image XML parsing0.00310.413420.0016
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00270.3571230.0001
String conversion0.00000.001340.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs