Magento Forum

Page 1 of 3
[SOLVED] Fatal error: Allowed memory size of 268435456 bytes exhausted. PLUS stalling issue
 
GS Tony
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-21
Santa Monica
 

Hi,

After upgrading to 1.3.0 I’m getting this error:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 356063152 bytes) in Unknown on line 0

Also, when adding/configuring products, I keep experiencing random stalling in the back-end… Spinning wheel and “please wait” message.

None of this was happening before the upgrade… Any thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sei
Member
 
Total Posts:  35
Joined:  2008-08-13
 

it could be a number of things that causes that error....

in my personal experience i would get this error in both the backend and frontend when ever i was going to view a configurable product with attributes and custom options…

i was able to solve it by enabling the cache…

 
Magento Community Magento Community
Magento Community
Magento Community
 
GS Tony
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-21
Santa Monica
 

Thanks for the input sei.  Yes, it’s happening in both front and backend, and I am dealing with configurable products with attributes and options.  I double checked and all cache are enabled but the error persists.  Any thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
GS Tony
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-21
Santa Monica
 

I’ve done a complete re-install and still get this error in both the frontend and backend:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 486959024 bytes) in Unknown on line 0

And, since the 1.3.0 upgrade, I’m having to do all product additions/edits two or three times each for anything to complete without stalling.  I deleted and recreated the DB, but it didn’t help.

I upped the memory in .htaccess & php.ini but it didn’t make a difference… I believe my host caps it at 256mb.  But from what I’ve read, shouldn’t that be enough?

 
Magento Community Magento Community
Magento Community
Magento Community
 
GS Tony
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-21
Santa Monica
 

So I’ve tried everything I can find in this forum to no avail, and here’s what my host, inmotionhosting, had to say…

“The core dumps that you are seeing and errors you are experiencing are common with Magento users on our servers.  We don’t usually recommend Magento to our customers for these reasons.  We ourselves have contacted Magento to seek resolutions to these issues to no avail.  Unfortunately, we don’t have any other answers for you when it comes to this particular cart software.  You may want to use one of the other e-Commerce solutions...”

 
Magento Community Magento Community
Magento Community
Magento Community
 
GS Tony
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2009-02-21
Santa Monica
 

I moved from inmotionhosting.com to nexcess.net and all is well.  I entered magento in the referral box when I signed up and, within the hour, I logged into my new account to find a fresh install of Magento already in place.  Also, when I’ve emailed support they’ve responded within minutes… Great experience with nexcess.net so far!

 
Magento Community Magento Community
Magento Community
Magento Community
 
FransHals
Jr. Member
 
Total Posts:  3
Joined:  2009-07-02
 
GS Tony - 17 April 2009 08:17 PM

I moved from inmotionhosting.com to nexcess.net and all is well.  I entered magento in the referral box when I signed up and, within the hour, I logged into my new account to find a fresh install of Magento already in place.  Also, when I’ve emailed support they’ve responded within minutes… Great experience with nexcess.net so far!

So let’s all go to nexcess.net and spend a lot of money!!!  This can’t be a solution according to me.

Is there any - somebody who did solve this problem??

Fatal error: Allowed memory size of 268435456 bytes exhausted.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ecgang
Jr. Member
 
Total Posts:  2
Joined:  2007-11-02
 

I too am having the same issues.  If I understand the posts correctly this is an issue you are having with inmotion specifically? That is currently what is happening with me.  I have modified my memory limits in both my .htaccess and php.ini files, no luck yet. I will post if i have a solution.

Thanks

Eric Gang

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

Do you have any backtrace for this error message?

 
Magento Community Magento Community
Magento Community
Magento Community
 
emeraldco
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-02-21
 

I am having the exact same problem.  Actually I was having no problems for a very long time.  Then Inmotionhosting moved me to a new server and boom I started locking up and having core dumps.  Today I went in there with over 7000 core dumps.  I upgraded to the newest version today and it got much worse.  Then I deleted the whole thing and restored from a backup before the problem started and I started having core dumps right away.  When I did that I also lost most of my images on my items....I can fix that later. 

I like inmotionhosting for all of my other needs so I rather not change.  But this is crazy...is it them?  Is it just a setting somewhere on the server?

Any ideas?  Is there more than 1 HTACCESS file I need to change?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ckosny
Guru
 
Total Posts:  349
Joined:  2009-02-28
Luxembourg
 

Do the core dumps or any apache error logs tell you which file causes the core dump?

Regarding the htaccess: Not to my knowledge. But the default htaccess contains quite a few settings that might not work on all servers.
So try removing everything in the htaccess except for the rewriting part (and even that you can remove for testing, although magento might not work properly).
But note that htaccess problems usually cause a 500 error every time, not a core dump some times.

Also check whether your new hoster has any new php extensions like eaccelerator, apc or zend installed. If yes, try disabling them.

If you are a php developer:
Can you check the line 549 in /lib/Varien/Object.php ?
At least on my system the code in this line is throwing an exception, whose message contains a ‘print_r($args, 1)’. This causes problems because some of the magento objects are quite large and can’t be used with print_r.  On my developement machine this causes a server crash quite reliably.
So if you feel comfortable with changing source code, remove the print_r from the message. adn then try again.

Can you also try the following:
Create a copy of the index.php used by magento. In this copy replace Mage::run() by Mage::app().
Then call this file (the output should be empty). Does that work or do you get a core dump?

Good luck

Claudia

 
Magento Community Magento Community
Magento Community
Magento Community
 
emeraldco
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-02-21
 

Well I just talked to the host for a long time.  They don’t think it is anything I did because it worked on their older server.  I think that there is a memory limit of some kind that is making it mess up.  They are going to ask around today on how to fix it.  They said it should be fixed by tonight.  We will see.

 
Magento Community Magento Community
Magento Community
Magento Community
 
emeraldco
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-02-21
 

OK they DID IT. 

It now works perfect.  I have tested everything, and also it is MUCH faster than it ever was before. 

This is what they sent me back.

It appears the memory issues were caused in multiple parts of your website. To resolve this I first copied the default php.ini file from the server and updated the memory_limit to 512M. Once this was done I added the following line:

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

to both your index.php and your app/Mage.php this seems to have resolve the memory issues you were experiencing when accessing your website.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Charles Albert
Member
 
Total Posts:  56
Joined:  2008-06-24
 

But this solution maybe cause problems to you in the future, when upgrading your Magento again. The best solution would be alter the max_execution_time, max_input_time and memory_limit = 512M in the php.ini and in the .htaccess file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
emeraldco
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-02-21
 

Those were already 512 before we even started having this issue.  That is why it is not mentioned.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pliningt
Jr. Member
 
Total Posts:  7
Joined:  2009-10-17
 

I’m currently having the exact same problems as GS Tony and I’m also with inmotionhosting. The support desk say I should move from a shared account to VPS hosting. I’m thinking of trying another host which has a good record for hosting Magento sites. There is one thing that I don’t understand about this fatal message. It says the allowed memory size is 268435456 bytes. This is 256 MB. I would have thought that this would change when I make the memory limit in php.ini less that 256MB but whatever I change it to e.g. 8MB, 64MB, 128MB the fatal message still says the allowed size is 256MB. I’ve also tried putting an ini_set instruction in index.php and app.Mage.php and it still says the allowed size is 256MB. Does inmotionhosting lock the memory limit at 256MB in some way that it can’t be altered up or down. Can anyone throw any light on this? Those of you who have moved from inmotionhosting to nexcess.net - what plan are you on?

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