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 magento.stackexchange.com, 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 community@magento.com.

Magento Forum

Page 3 of 3
[SOLVED] Fatal error: Allowed memory size of 268435456 bytes exhausted. PLUS stalling issue
 
carikira
Jr. Member
 
Total Posts:  3
Joined:  2011-08-13
 

this is _not_ solved.

happened to me today, too.
i have a 1&1;Could Dynamic Server (http://www.1und1.info/xml/order/CloudDynamicServer) with 1GB Memory.
After putting some articles in a new shop today the site went offline.
/ and /admin are dead by now.

i set the memory limits in php.ini and .htaccess to 768 MB.
i can see the memory rise to 75% in “top” on my linux shell, when getting the shops index.php, and then the exception is throwed.
i just have 15 articles and 4 categories in my shop, how can this be?
why does the shop use so much memory?!?
this is imho a memory leak, isnt it?

anyways, is there a way to resolve this?
i dont want to go to another provider, this shop is already sold to a customer and we would really look silly if we tell them:"the server we chose for you does not meet the requirements” or “the shop system we chose is broken” -.-
we already purchased a theme für magento and our designer and another coder heavily customized it, so much money would be lost.

waiting for some kindly help

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

Are you using Apache ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SvenV
Jr. Member
 
Total Posts:  8
Joined:  2009-01-11
 

Hi!

I have similar problem. In my customer’s store there are mainly configurable products. Checkout does not get further from the first step (billing) and I can see in the logs:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 523800 bytes) in /home/vhosts/*.*.*/htdocs/app/Mage.php on line 322, referer: http://*.*.*/checkout/onepage/

However it works with simple product! I’ve create a simple test product and it works fine with this.

Server is Apache 2.2 with 1GB memory (running on a VPS) with MySQL 5.1.41 and PHP 5.3.2

Any advice?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mariyar
Jr. Member
 
Total Posts:  11
Joined:  2011-05-19
 

I am dealing with configurable products with attributes and options.  I double checked and all cache are enabled but the error persists.  .....

__________________________________________
buy aion kinahbuy wow gold euwow gold for sale

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

What do you have your memory_limit set to in your PHP.INI file?

 
Magento Community Magento Community
Magento Community
Magento Community
 
K21_karan
Jr. Member
 
Total Posts:  5
Joined:  2011-06-11
Toronto
 

Set the memory_limit inside the php.ini to 128M

Hope it works

 
Magento Community Magento Community
Magento Community
Magento Community
 
bags307
Jr. Member
 
Total Posts:  2
Joined:  2010-08-08
 

the line to add to index.php is formatted wrong earlier.

it should be

ini_set(’memory_limit’, “512M");

 
Magento Community Magento Community
Magento Community
Magento Community
 
zero cool
Jr. Member
 
Total Posts:  10
Joined:  2008-08-26
 
bags307 - 01 December 2011 01:29 PM

the line to add to index.php is formatted wrong earlier.

it should be

ini_set(’memory_limit’, “512M");

-> it works like a charm.

 
Magento Community Magento Community
Magento Community
Magento Community
 
albertbori
Jr. Member
 
Total Posts:  3
Joined:  2012-01-18
 

I don’t want to resurrect an old thread, but I was having this problem every time I went to the “manage downloads” page in the admin, using the MageWorx downloads module on a Windows Server.

The code attempts to return the download’s url from the actual file’s location, but uses the wrong file-directory delimiter ( ‘/’ ). So I modified the code to check the server’s OS and use ‘\\’ in the case of Windows. This solved the memory exception error.

The moral of the story is that the memory exception may not be due just because of memory limitations, but could be because of some faulty code somewhere.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bencentra
Jr. Member
 
Total Posts:  1
Joined:  2012-05-30
 
albertbori - 10 February 2012 06:44 PM

The moral of the story is that the memory exception may not be due just because of memory limitations, but could be because of some faulty code somewhere.

I agree. The original post was concerning an old version of Magento, so anyone who stumbles on this now is probably experiencing a flaw in their own code.

For me, the flaw was a recursive PHP method I wrote. The method searches for a file within a directory or any sub-directories. At first, I was using scandir($directory), which adds ‘.’ and ‘..’ to the list or returned files/directories, so it ended up catching itself in an infinite loop of searching within itself and it’s parent directories, which used up all the memory. I swapped scandir() for glob(), and it worked fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rleising
Jr. Member
 
Total Posts:  5
Joined:  2012-03-26
 

I just got the same error from the cart and have narrowed down the problem.

I wrote an extension to handle adding items to the cart through ajax, and on a users first visit to the site, when they tried to add something to cart it would stall and return the memory error.

I took a look at my code and narrowed the problem down to this line:

$items Mage::helper('checkout/cart')->getCart()->getItems()->getData();

So i commented that out and used this instead:

$items Mage::getSingleton('checkout/session')->getQuote()->getAllItems();

and it worked like a charm

So somewhere in the execution of the the line using the helper it ran into problems. The weird part is that it was only on a users first visit to the site, or more accurately, a user that had no cookies from the site. If I deleted my cookies I could recreate the error every time. But once I had run into the error and refreshed the page, everything worked fine, no conflicts no errors.

I figured I would share what I found and hope it helps someone running into the same problem.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 3 of 3