我的 Magento 1.6.1.0 社区版商店出现问题。它尝试每 15 秒左右分配大约 0.5 GB 的内存。不幸的是,错误消息并不是很有帮助,如下所示:
[29-Mar-2012 07:36:38] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 431187952 bytes) in Unknown on line 0
[29-Mar-2012 07:36:40] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 244111344 bytes) in Unknown on line 0
[29-Mar-2012 07:36:54] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 523921392 bytes) in Unknown on line 0
[29-Mar-2012 07:37:07] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 534718448 bytes) in Unknown on line 0
我已经和我的主机谈过这个问题,虽然他们说 128Mb 的内存限制对于运行完整的 magento 商店来说有点低(我们打算在上线时升级到更慷慨的软件包),但这些错误表明了一些事情Magento 而不是托管有问题,因为我相当确定这不是正常行为。我无法更改此软件包的 128Mb 内存限制。
即使在我可以相当确定根本没有人访问该网站的时候,这种情况仍然会全天候发生。这让我想知道这是否与 Magento 运行的 cron 作业有关。
有人对如何帮助追踪这个问题有任何建议吗?或者有人遇到过类似的事情吗?
最佳答案
在安装任何类型的软件之前,您应该概述系统要求:
http://www.magentocommerce.com/system-requirements
Magento 明确指出了
Memory_limit不少于256Mb(最好是512)
关于php - Magento 尝试分配过多的内存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9920469/