Disable PHP OPcache JIT by default - #1653
Merged
Merged
Conversation
JIT tracing mode in PHP 8.3 has known memory corruption bugs that can cause recurring PHP-FPM crashes with ~4GB allocation attempts. WordPress workloads are I/O-bound and see negligible benefit from JIT, making the risk/reward unfavorable. JIT can be re-enabled via group_vars by setting php_opcache_jit and php_opcache_jit_buffer_size. Also consolidates JIT directives into 10-opcache.ini.j2 instead of splitting them across two config files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
swalkinshaw
approved these changes
Mar 18, 2026
swalkinshaw
left a comment
Member
There was a problem hiding this comment.
Unfortunate but makes sense for now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
php_opcache_jit: 'disable',php_opcache_jit_buffer_size: 0)10-opcache.ini.j2(previously split across10-opcache.ini.j2andphp-fpm.ini.j2)Context
PHP 8.3's JIT tracing mode has known memory corruption bugs that cause recurring PHP-FPM worker crashes. The crash signature is a consistent ~4GB allocation attempt (
0x100040000), which is a JIT corruption artifact — not real application memory demand.Reported here: https://discourse.roots.io/t/php-8-3-jit-tracing-recurring-crash-at-theme-php-325-4gb-allocation/30241
Since Trellis defaults to PHP 8.3 with JIT tracing enabled, all sites on default configuration carry this risk. WordPress workloads are overwhelmingly I/O-bound and see negligible real-world performance benefit from JIT, making it a poor tradeoff.
OPcache bytecode caching remains fully enabled and unaffected.
Re-enabling JIT
Users who want JIT can opt in via
group_vars:🤖 Generated with Claude Code