Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Bug #753 mulitple inserts using lots of memory
Submitted: 2004-02-13 18:32 UTC
From: todd at groundspring dot org Assigned:
Status: No Feedback Package: DB_DataObject
PHP Version: 4.3.3 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-13 18:32 UTC] todd at groundspring dot org
Description: ------------ I created a loop to insert 10000 rows by reusing the same DataObject instance. However, it's exceeding the 8MB memory limit on our server around the 4300th insert. Perhaps it's holding on to some sort of cache/transaction history. Also using Apache 1.3.29 Reproduce code: --------------- DB_DataObject::DebugLevel(1); $org = new DataObject_ENOrganization(); $orgCnt = $org->count(); echo( "$orgCnt orgs <br>"); for($i = 0; $i < 10000; $i++) { //reset the primary key $org->setId(null); //a unique key, but not the primary $org->setAccountId($orgCnt + $i); $rslt = $org->insert(); } Expected result: ---------------- 10000 new rows in the "organization" table of a MySQL db. Actual result: -------------- Out of memory error (upper limit set to 8MB) around the 4300th insert.

Comments

 [2004-02-14 06:24 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-14 07:23 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-02-17 18:38 UTC] todd at groundspring dot org
I got the same result with overload turned off. I'd like to use overloading as well, so I will try moving to Apache 2 and see if that helps.
 [2004-02-18 01:43 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-06-28 09:48 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!