How to Solve PHP error “Zend”_ mm_ heap corrupted”

I: Environment Introduction
Ali cloud  
[[email protected]]$ cat /etc/redhat-release 
CentOS Linux release 7.0.1406 (Core) 
There is a local test environment and an online environment, the online environment is placed in svn
[[email protected] ~]$ php -v
PHP 5.6.20 (cli) (built: Apr 9 2016 20:40:37) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies


Link: https://stackoverflow.com/questions/2247977/what-does-zend-mm-heap-corrupted-mean

2: Content of error report

A function of the website suddenly fails to work. Click in to display “502 bad gateway”, but the test environment is normal

At that time, the first reaction was that the problem with nginx was due to the network. After looking at the nginx status, it was still not possible to refresh the browser page. PHP page, and then think of other sites to check- fpm.log Error file for

tail -f /usr/local/php56/var/log/php- fpm.log

[16-May-2018 11:30:28] WARNING: [pool www] child 32494 said into stderr: “zend_ mm_ heap corrupted”
[16-May-2018 11:30:28] WARNING: [pool www] child 32494 exited with code 1 after 534.670302 seconds from start
[16-May-2018 11:30:32] WARNING: [pool www] child 32521, script ‘/web/zwbi/admin/public/ index.php ‘ (request: “GET/index.php “) executing too slow (5.745961 sec), logging

3: Solutions

1. Memory problem

Open php.ini File to find the next two lines to increase the output_ The buffering value either turns off this option or executes export use on the command line_ ZEND_ Alloc = 0 PS: no use_ ZEND_ Alloc performance will decline sharply, which is PHP’s own memory management mechanism

vim /usr/local/php56/etc/ php.ini

output_ buffering = On
output_ buffering = 25600

Restart PHP FPM

Sudo systemctl restart/usr/local/php56/SBIN/PHP FPM

2. chown -R www.www filename && chmod 777 filename

But it’s still 502

 

3. Check nginx error log and PHP- fpm.log Log

[06-Mar-2018 15:54:57] WARNING: [pool www] child 30396 said into stderr: "zend_mm_heap corrupted" [06-Mar-2018 15:54:57] WARNING: [pool www] child 30396 exited with code 1 after 239.805753 seconds from start

 

Baidu and Google inquired about some links and “determined that it was the problem of opcache module”. At that time, they thought it could be basically solved. But it’s useless to comment out the whole opcache module. Link posted below, did not solve my problem, may be helpful to friends.

https://stackoverflow.com/questions/2247977/what-does-zend-mm-heap-corrupted-mean
https://github.com/websharks/comet-cache/issues/705

4. I think it is a problem of some dependent components, so I update the composer package of the test environment to the formal environment, and the test still fails. After the test fails, restore the component (do these operations must remember to backup, restore at any time).

5. There are differences with development. I think there may be a problem with the code operation, such as a bug or the associated file permissions. I think it’s my environment problem. Do as you say, set the authority of all files in the formal environment at one time.

sudo chown -R www.www /web/xxx

At this point, the problem remains unsolved

6. Code problems

Develop the code version before rollback, and solve the problem

 

Similar Posts: