Linux:PHP警告:无法为池分配内存
时间:2020-02-23 14:39:55 来源:igfitidea点击:
在您的Apache错误日志中找到此错误?
PHP Warning: require_once(): Unable to allocate memory for pool.
这实际上是由APC(备用PHP缓存)引起的。
已达到为APC分配的内存限制,并且不再可以缓存其他PHP脚本。
您的上出现此类错误的症状将以空白页结束。
要解决此问题,我建议增加内存限制并降低超时。
编辑APC配置:
/etc/php.d/apc.ini
增加内存限制:
Configuration"]apc.shm_size=
(默认通常为64M,将其增加到128M)
降低TTL:
Configuration"]apc.ttl= apc.user_ttl= apc.gc_ttl=
(默认通常为7200秒,将其降低到3200秒)
然后重新启动Apache Web服务器守护程序:
service httpd restart