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 1 of 2
Fatal error: Out of memory upgrading from 1.2.0.3 to 1.2.1 (Magento Connect Manager)
 
thebullet
Jr. Member
 
Total Posts:  23
Joined:  2008-10-16
 

I try to upgrade to 1.2.1 from 1.2.0.3 through Magento Connect Manager and after all downloading this error occur:

Fatal error: Out of memory (allocated 30408704) (tried to allocate 1113629 bytes) in /homepages/8/d110405264/htdocs/CBOnline/magento/downloader/pearlib/php/PEAR/Registry.php on line 1059

Anybody knows what is wrong?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

The PHP memory limit on your server is set to 32MB, which is too low. You should increase the value of memory_limt to say 128M. This can either be done via .htaccess (if PHP run as an Apache module), or via a custom php.ini file. If that does not help, you should contact your host and ask them to increase it for you. Please note that many shared hosts do not allow a higher memory limit, as it could have a negative impact on their servers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rfried
Jr. Member
 
Total Posts:  1
Joined:  2008-11-19
 

And if your host won’t increase the memory limit?  Can Magento 1.2.1 still be used?  What is the workaround for updating?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

If your host is not willing to increase the memory limit, or you cannot override it in .htaccess/custom php.ini, there is no workaround for this. If you get out of memory warnings, that means Magento simply is trying to allocate more memory than what is available/allowed.

 
Magento Community Magento Community
Magento Community
Magento Community
 
laserbeam
Jr. Member
 
Total Posts:  28
Joined:  2008-07-31
 

I think this is a serious bug in the memory management of magento for my site gets the same error at the bottom of almost every page.  I asked my host increase the php value of memory_limit to 128M but the fatal error continue to occur persistently even if the memory_limit has been raised to 128M.  It’s very discouraging that every upgrade fixes old issues but introduces new more serious bugs and this would push people to seek other eCommerce solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

the only workaround is to move from a shared hosting environment to either a VPS or dedicated server. Ive seen some pretty reasonable VPS packages going around that could be used. Yes there is a cost impact, but at least this way allows you more flexibility & control in your hosting envirionment

hth
brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

I started to constantly receive error message while doing export using profiles after upgrading to version 1.3. If I lower count of product using filter I can solve this problem, but is very annoying. Total count of items is not too big, just about 2600.
I talked to my host and changed memory limit from 64 (default limit in Magento .htaccess file) to 128MB, but it did not help.
When I create file using gbase.php it works fine, no problem. I believe that there should be a way to redesign export profiles to avoid “out of memory” problem.
Unfortunately, we still waiting response from Magento team and it looks like it may be forever.
Sometimes I think I better stay with version 1.21, version 1.31 didn’t bring me any real advantages.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

hey oldgamer,

i do recall some threads talking about bad memory leaks when using.
I cant recall the exact thread atm, but if you search for it you see a post about memory leaks

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

Thanks brendan,

I found that the problem still there. Guys change some Magento core files to avoid the problem with hope that Varien will take changes into account. These changes been made for version 1.2.
My post was a cry out in hope that Magento team will do some changes and fix the problem or at least tell us something.
I understand that they are busy now with commercial version of Magento, free version is not that attractive anymore. I just hope that they still do some fixes as they did before.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Neo The Coder
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2009-04-13
 

hi guys

I was also facing this problem and i have corrected it by putting this code on the first line of \app\design\frontend\default\default\template\page\html\header.phtml

ini_set(’memory_limit’, ‘64M’);

This one Worked for me properly

Hope it’ll work for someone else too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ksuite
Jr. Member
 
Total Posts:  5
Joined:  2009-09-26
 

Tried that line of code, it only prouces an eror. This is sad, I really like Magento but I am only on my second product in ONE Category and am getting Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3508 bytes) in place of showing me the second picture. I have the memory bumped up to 128M in .htaccess too. I need a solution

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady Barrows
Jr. Member
 
Total Posts:  29
Joined:  2009-09-17
 
Neo The Coder - 16 June 2009 03:53 AM

hi guys

I was also facing this problem and i have corrected it by putting this code on the first line of \app\design\frontend\default\default\template\page\html\header.phtml

ini_set(’memory_limit’, ‘64M’);

This one Worked for me properly

Hope it’ll work for someone else too.

Where on the header.phtml do you place this code exactly?  This is what is the code:

?>

<div class="header-top-container">
<div class="header-top">
<h1 id="logo"><a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>” alt="<?php echo $this->getLogoAlt() ?>” /></a></h1>
<p class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content') ?> »</strong></a></p>
<?php echo $this->getChildHtml('topSearch') ?>
<div class="quick-access">
<?php echo $this->getWelcome() ?><br />
<div class="shop-access">
<?php echo $this->getChildHtml('topLinks') ?>
</div>
<?php echo $this->getChildHtml('store_language') ?>
</div>
</div>
</div>
<?php echo $this->getChildHtml('topMenu') ?>

Please help me by showing exactly where in the above code I should place the code you suggest for the out of memory error message.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady Barrows
Jr. Member
 
Total Posts:  29
Joined:  2009-09-17
 
Neo The Coder - 16 June 2009 03:53 AM

hi guys

I was also facing this problem and i have corrected it by putting this code on the first line of \app\design\frontend\default\default\template\page\html\header.phtml

ini_set(’memory_limit’, ‘64M’);

This one Worked for me properly

Hope it’ll work for someone else too.

I placed the line of code above like this:

<?php
ini_set
(’memory_limit’‘64M’);
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   design_default
 * @package    Mage
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>

<div class="header-top-container">
    <
div class="header-top">
        <
h1 id="logo"><a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
        <
class="no-display"><a href="#main"><strong><?php echo $this->__('Skip to Main Content'?> &raquo;</strong></a></p>
        
<?php echo $this->getChildHtml('topSearch'?>
        
<div class="quick-access">
           
<?php echo $this->getWelcome() ?><br />
            <
div class="shop-access">
                
<?php echo $this->getChildHtml('topLinks'?>
            
</div>
            
<?php echo $this->getChildHtml('store_language'?>
        
</div>
    </
div>
</
div>
<?php echo $this->getChildHtml('topMenu'?>

It works for me, so far. I am able to log into admin without the ‘our of memory’ error message, so I thank you so much. Every other suggestion never worked and I tried them all. Thanks so much for your help! I will let everyone know if I get the error message again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady Barrows
Jr. Member
 
Total Posts:  29
Joined:  2009-09-17
 

The admin area is fine but then I checked the fronted and got this error message:

Notice: Use of undefined constant �memory_limit� - assumed ‘�memory_limit�’ in /homepages/38/d104790298/htdocs/magento/magento/app/design/frontend/default/default/template/page/html/header.phtml on line 2
Trace:
#0 /homepages/38/d104790298/htdocs/magento/magento/app/design/frontend/default/default/template/page/html/header.phtml(2): mageCoreErrorHandler(8, ‘Use of undefine...’, ‘/homepages/38/d...’, 2, Array)
#1 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(144): include(’/homepages/38/d...’)
#2 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#3 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#4 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#5 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Abstract.php(503): Mage_Core_Block_Abstract->toHtml()
#6 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Abstract.php(454): Mage_Core_Block_Abstract->_getChildHtml(’header’, true)
#7 /homepages/38/d104790298/htdocs/magento/magento/app/design/frontend/default/default/template/page/2columns-right.phtml(41): Mage_Core_Block_Abstract->getChildHtml(’header’)
#8 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(144): include(’/homepages/38/d...’)
#9 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(176): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#10 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Template.php(193): Mage_Core_Block_Template->renderView()
#11 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Block/Abstract.php(643): Mage_Core_Block_Template->_toHtml()
#12 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Model/Layout.php(526): Mage_Core_Block_Abstract->toHtml()
#13 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(347): Mage_Core_Model_Layout->getOutput()
#14 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Cms/Helper/Page.php(100): Mage_Core_Controller_Varien_Action->renderLayout()
#15 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#16 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Cms_IndexController->indexAction()
#17 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#18 /homepages/38/d104790298/htdocs/magento/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /homepages/38/d104790298/htdocs/magento/magento/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch()
#20 /homepages/38/d104790298/htdocs/magento/magento/index.php(65): Mage::run()
#21 {main}

Fix one problem and opens up another can of worms. I wish I knew how to fix this. Does anyone have any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady Barrows
Jr. Member
 
Total Posts:  29
Joined:  2009-09-17
 

I removed the line:

ini_set(’memory_limit’, ‘64M’);

from line 2 of the header.phtml and then my frontend works again. Anyone else have an idea how to remove the ‘out of memory’ error message?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nexus Rex
Sr. Member
 
Avatar
Total Posts:  139
Joined:  2008-07-10
Utah, USA
 

To fix this I added:
<code>ini_set(’memory_limit’, ‘-1’);
</code>

to: /magento/downloader/pearlib/php/PEAR/Registry.php on line 34.

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