wpsharks / comet-cache

An advanced WordPress® caching plugin inspired by simplicity.
https://cometcache.com
GNU General Public License v3.0
77 stars 18 forks source link

PHP OPcache Bug: "zend_mm_heap corrupted" error #705

Open raamdev opened 8 years ago

raamdev commented 8 years ago

The zend_mm_heap corrupted error is almost always related to bugs in PHP OPcache, bugs that can be triggered by any number of things, including other extensions being loaded into Apache.

This Stackoverflow post lists lots of possible workarounds:

There are also a lot of PHP bug reports related to the zend_mm_heap corrupted error:

These versions of Comet Cache / ZenCache are affected by this PHP bug:

Versions of ZenCache Lite prior to v160222 were running an older codebase that utilized fewer PHP features and appears to remain mostly unaffected by this PHP bug.

Why am I only having this problem with Comet Cache / ZenCache?

The reason you would start seeing this error with Comet Cache is because Comet Cache uses output buffering so heavily, which is necessary to cache the output of WordPress (the primary purpose of a WordPress caching plugin). Other non-caching plugins won't be doing output buffering, or if they do, won't be doing it as frequently as Comet Cache, which is why they might not cause any problems at all.

Certain PHP features can also increase the chances of triggering an OPcache bug. Comet Cache, and the latest ZenCache release, utilize many different PHP features to improve performance and maximize maintainability. That could explain why older versions of ZenCache did not trigger any OPcache bug while newer versions do.

raamdev commented 8 years ago

@jaswsinc Any idea if OPcache-related issues are more likely to go away now that we're switching to PHP Traits and getting rid of Closures? (https://github.com/websharks/comet-cache/issues/635).

jaswrks commented 8 years ago

Nope. No idea, sorry.