帮助中心 >  技术知识库 >  网站相关 >  建站知识 >  解决Apache错误zend_mm_heap corrupted、Segmentation fault (11)

解决Apache错误zend_mm_heap corrupted、Segmentation fault (11)

2016-11-23 20:16:46 7803

最近有一台Linux服务器间隙的报错,Apache每过一段时间就会假死,web环境是LNMPA。


检查Apache日志error_log,发现错误如下:

[Thu Jul 28 15:21:45 2016] [notice] child pid 16842 exit signal Segmentation fault (11)
[Thu Jul 28 15:22:29 2016] [notice] child pid 16839 exit signal Segmentation fault (11)
[Thu Jul 28 15:22:40 2016] [notice] child pid 16994 exit signal Segmentation fault (11)
[Thu Jul 28 15:24:28 2016] [notice] child pid 17169 exit signal Segmentation fault (11)
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted

这个时候,nginx是正常的,静态资源可以访问,绝大多数php页面也是可以访问的,但是一旦php页面需要调用底层命令的时候,就报错了,比如Laravel的生成配置缓存命令:

 $exitCode1 = Artisan::call('config:cache', []);//重新生成配置缓存
  $exitCode2 = Artisan::call('route:cache', []);//重新生成路由缓存
  $exitCode3 = Artisan::call('optimize', []);//生成编译文件

此时Apache无法正常执行php页面。


网上搜搜,发现了stack overflow上的一篇POST: http://www.landui.com/questions/2247977/what-does-zend-mm-heap-corrupted-mean,里面提供了一个思路,导致这个问题的原因在于 opcache,只要把 opcache的cli方式关闭就可以了,打开php.ini:

opcache.enable_cli=0


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: