Corrupt heap in php script

zend_mm_heap corrupted appears as an error message in a PHP program that I wrote to pre-render a large environment.

I suspect this is due to having too many variable assignments in the script, although I am not sure about this since I wrote the script to have only about 20 variables at any given time, one of which is an array that can contain up to 500 elements. However, the total number of iterations is on the order of several billion.

I will correct my suspicions, and if so, what can be done about this? It would be better, for example, to run the script for a while, then upload the important variables to the file and restart the script, forcing him to pick up these variables and continue?

+5
source share
2 answers

I saw this problem and can reproduce it using phalcon, but it seems to come from the APC cache. I fixed the transition from APC to zend opcache. You can try disabling APC to make sure it is gone.

Best of all, I can reason from my research that APC does something in the memory that zend uses. PS, it has nothing to do with the zend framework, this is an error related to the parts of zend that were combined in php.

0
source

The solution to your problem is to download the latest version of APC compatible with your version of PHP.

You will have to force it to overwrite the old version of APC. In many cases, this will fix the problem.

0
source

All Articles