[wp-trac] [WordPress Trac] #60397: Invalidate opcache after theme / plugin updates
WordPress Trac
noreply at wordpress.org
Wed Jan 31 10:10:01 UTC 2024
#60397: Invalidate opcache after theme / plugin updates
-------------------------------------+-------------------------------------
Reporter: seebeen | Owner: seebeen
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 6.4.2
Severity: major | Keywords: needs-patch dev-
Focuses: accessibility, | feedback
administration |
-------------------------------------+-------------------------------------
Depending on the server opcache configuration, there is a high possibility
of getting an Internal Server Error, or similar after updating a plugin /
theme.
Specific opchache settings I've verified that trigger the error are:
{{{
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=24
opcache.max_accelerated_files=130987
opcache.max_wasted_percentage=2
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=5
opcache.revalidate_path=0
opcache.save_comments=1
opcache.enable_file_override=1
}}}
Error happens because validate_timestamps is set to 1 and revalidate_freq
is greater than 0. This means that after plugin update, error 500 will
stay for up to revalidate_freq seconds due to invalid opcache.
This can be mitigated by adding a opcache_invalidate or opcache_reset call
upon successful update.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60397>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list