这是正常的 Magento 内存行为吗
我正在配置和构建 Magento 站点,当前接收到超出允许的内存消息,例如致命错误:允许的内存大小为 67108864 字节耗尽(尝试分配 77 字节)
。尝试的内存分配量总是非常小,并且并不总是发生在同一点(主要是 Magento Collection 管理代码和 Varien/Object 代码)。
我想知道这是正常行为还是有什么不对劲,因为 64 MB 对于客户端请求处理来说似乎相当多了。我的数据库大小现在约为:
* ~2500 个产品
* ~700 个属性集
* ~250 个属性,具有超过 13,000 个选项(~25,000 个选项值)
* eav_entity_attribute 大约是 50,000 条记录
我感觉 Magento 从数据库中预加载了太多数据,想知道你们中是否有人遇到过同样的问题,或者知道什么会消耗如此多的内存。
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Magento 的 PHP 要求 包括“Memory_limit 不少于 256Mb[sic](最好是 512)”。
是的,每个请求需要大量内存,但这就是灵活性和功能的代价。
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.
此外,内存限制错误也是预期的行为,因为内存通常以小块的形式分配,特别是在具有大量日志记录和会话管理的设置中。
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.