Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP OPcache Bug: "zend_mm_heap corrupted" error #705

Open
raamdev opened this issue Mar 4, 2016 · 2 comments
Open

PHP OPcache Bug: "zend_mm_heap corrupted" error #705

raamdev opened this issue Mar 4, 2016 · 2 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Mar 4, 2016

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:

Workarounds

  • Disable OPcache altogether (the surefire solution: opcache.enable=0).
  • Try Setting opcache.enable_cli=0 in your PHP configuration and restart the web server.

Affected Comet Cache / ZenCache versions

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

  • ZenCache Lite v160222+
  • ZenCache Pro (all versions)
  • Comet Cache (all versions)

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
Copy link
Contributor Author

raamdev commented Mar 4, 2016

@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? (#635).

@jaswrks
Copy link

jaswrks commented Mar 4, 2016

Nope. No idea, sorry.

@raamdev raamdev changed the title PHP Bug: opcache.enable_cli=1 generates "zend_mm_heap corrupted" error PHP OPcache Bug: "zend_mm_heap corrupted" error Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants