Is this normal Magento memory behaviour

2019-08-03 22:21发布

问题:

I am configuring and building a Magento site and currently receiving out of allowed memory messages like Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 77 bytes). Always the amount of attempted memory allocation is very small and it doesn't always occur at the same point (mostly Magento Collection management code and Varien/Object code).

I wonder if this is normal behaviour or that something is not right, because 64 mb for just a client request handling seems quite much. My database size is now about:
* ~2500 products
* ~700 attribute sets
* ~250 attributes which do have over 13,000 options (~25,000 option values)
* eav_entity_attribute is about ~50,000 records

I have the feeling Magento is preloading way too much data from the database and wondered if any of you has had experience with equal problems or an idea what costs so much memory.

Thanks!

回答1:

Magento's PHP requirements include "Memory_limit no less than 256Mb[sic] (preferably 512)".

Yes it's a lot of memory per request but that's the price of flexibility and features.



回答2:

Also the memory limit error is expected behavior since memory is usually allocated in small chunks, especially in setups with lots of logging and session management.