2

I have been working with Magento on my localhost and everything was fine until i added a new module. now i am getting the following error: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261900 bytes) in /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php

I tried to change the memory_Limit to 512M then it generated the same errors but this time with more memory size:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 261900 bytes) in /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php

Does anyone have any idea what causes this?

2 Answers 2

3

Put code below to this path: /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php

ini_set('memory_limit', '512M');
3
  • Just did it and it produced the same error: Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 261900 bytes) in /Applications/XAMPP/xamppfiles/htdocs/magento/app/Mage.php Oct 8, 2012 at 10:02
  • use 1024M instead of 512M: ini_set('memory_limit', 1024M);
    – mr.soroush
    Oct 8, 2012 at 10:14
  • That only does what changing the memory_limit line in the php.ini file did for him. And his system was paying attention to the php.ini file because Magento ran out of memory at the new higher limit when he changed it. It will probably run out with the 1G limit as well, the module seems to have a memory leak. I'd get in touch with the developer that created it at this point. Oct 8, 2012 at 15:28
1

Most likely the extension you've installed has memory leaks in it. If you've payed for it, you should ask for an assistance from the extension developer. Otherwise, you should find the bottleneck place yourself with the help of xdebug profiler or other similar tool.

At the end, you can just disable the extension.

2
  • Thanks, however i just added a new module manually. There hasn't been any extra extensions. Oct 8, 2012 at 10:04
  • by extension, I meant Magento module, sorry for making myself unclear Oct 8, 2012 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.