Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Memory leak Problem while adding or updating the thousand of products. 
Jr. Member
Total Posts:  1
Joined:  2010-04-07

Hello every one,

Can some one help me asap...? What my problem is: I have one script which read the magento products feed from the third party site.
I read the feeds through xml Reader and store it in the database.. then from the database i want to add the product if its not exist in the current store or update if exists..  There are around 35000 products coming from the feeds. when i am trying to update the store with the magento api.. i have got the error like.. “Allocated memory size exhausted..” I have change the php.ini to some specific value… but it still creates the problem, when the limit is reach…

I have read some of the post they say that actually there is some problem with the memory leak in the magento…
So please if any body has face the problem.. and find the solution please let me know asap…


Magento Community Magento Community
Magento Community
Magento Community
Total Posts:  35
Joined:  2009-02-01

I have spent weeks discovering a huge memory leak in magento.  It duplicates an array of products over and over.  So for example you tried to import 1000 products you would have an array containing 1000 products 1000 times.  It eats up memory but also a lot of cpu parsing the info. I have cut down my script import time dramatically. There are other memory leaks that deal with object clean up that haven’t been able to pin-point but have a method to fix that too.  The fix is only 1 line of code.  If you are willing to compensate me I will give you the fix.  I usually would just post it but I really had to spend a lot of time and compile php into debug mode and run it thru valgrind and then use a php debugger.

If you import more than 100 products this fix really helps and it speeds up regular magento operation as well.  I contacted magento about this and they did not reply.

message me or email if interested

I also sell a couple of modules at

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top