2

I have a problem with memory size exhausted error.

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /...../public_html/lib/Zend/Db/Statement/Pdo.php on line 228

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /...../public_html/lib/Varien/Autoload.php on line 153

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in /...../public_html/lib/Zend/Db/Statement/Exception.php on line 1

It happens when I try to change store view in checkout page.

I already know that it is somehow connected with the change I've made in

app/code/core/Mage/Tax/Model/Calculation.php

in getRateRequest() function, I've added following code:

$bAddress = Mage::getSingleton("checkout/session")->getQuote()->getBillingAddress();

And after this change and this change only, it stops working. If I comment this line it works fine again.

Obviously changing memory limit doesn't work. It just takes more time but it throws errors anyway.

Edit: Note that the problem only occurs when I change store view in checkout, if I don't change it or I change it on homepage and then go to checkout it works perfectly fine.

closed as off-topic by sv3n, Jai, Manoj Deswal, Priyank, Piyush Jan 29 '18 at 5:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced OR seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – sv3n, Priyank, Piyush
If this question can be reworded to fit the rules in the help center, please edit the question.

0

It's looks like your PHP limit is exhausted as you are using a lot of resource 'loading' or whatever you script needs all that memory for.

Ask you server provider to change memory_limit to something higher for your php or do it yourself. Let me know if you have any more questions.

Just wanted to add your right at 500mb right now. Doubling should work, I use 4 GB, but it all depends on your environment.

It's a good idea to create a phpinfo.php file as well to see what your server is at as some areas such as max execution time might also want to be adjusted.

Good luck!

  • He said that the change in the memory limit does not help .... – MagenX Jul 8 '16 at 7:31
  • It's working fine on 512mb limit, I never had a similiar problem. It seems like it's kind of an infinite loop there, changing limit is not gonna change anything but the time it takes to exhaust it. However it will be exhausted, eventually - no matter what the limit is. – br33f Jul 8 '16 at 9:11
  • The error clearly list what it is in this case. Run a phpinfo.php file after the adjustments are made to make sure it changes the values. – Anthony Cicchelli Jul 8 '16 at 11:31
  • I have only one product installed on a test server and I have tried increasing the memory up to 2048M and it's still getting the error. Why in the hell is this thing consuming so damn much memory? – Scott Nov 13 '17 at 19:28
0

In addition to what @AnthonyCicchelli said, I want to add that 500MB memory isn't really sufficient to properly run Magento. Magento is not designed for your typical shared hosting...

Here are some more details: how to determine hosting requirements

  • He said that the change in the memory limit does not help .... – MagenX Jul 8 '16 at 7:31
  • 1
    Note that the "memory_limit" setting of PHP is not the same as the actual physical memory. While you shouldn't run Magento on a machine with 500 MB RAM, it's usually enough per PHP process. – Fabian Schmengler Jul 8 '16 at 7:55
  • It's hard to determine how much RAM I actually have as it is a shared hosting, but it doesn't seem not to beenough. It's working pretty fast and I don't think it is connected to my problem. Thank you for your answer anyway. – br33f Jul 8 '16 at 9:27
  • 1
    @tjons. Shared hosting can be an issue with many applications especially when you starting to customize your installs. So great point. – Anthony Cicchelli Jul 8 '16 at 11:32

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