Conversation
3059364 to
1b21e1b
Compare
Signed-off-by: Melvyn Ng <deejaycrapsody@gmail.com>
1b21e1b to
b7f6760
Compare
8d181e6 to
d9cb654
Compare
|
Hey @theCalcaholic, noticed that OPcache configurations in opcache.ini.sh are being changed in the recent commits. Hope you are willing to check out this PR for some OPcache configuration. 🙏🏻 |
|
Hey @DJCrapsody, thank you for the PR! I'm only changing the bare minimum right now, to a) try to fix the issue with JIT segfaults, that's plaguing us since PHP 8.1 and b) remove warnings in NC 25. This release is not about opcache specifically and unfortunately I didn't have time to review your PR yet. Your changes, once approved, will be included in a later release (probably 1.51.1 or 1.51.2). In the meantime, can you verify if your changes are backwards-compatible to at least PHP 7.4? EDIT: Actually, we do need compatibility with PHP 7.3, even, as some people are still on that version. |
dce6a9f to
cdf99f6
Compare
ec7a07e to
9ed15a5
Compare
dc129b7 to
41ba7cc
Compare
e24d3a0 to
f032fd7
Compare
75bffeb to
31d5ed9
Compare
f14678a to
0e40867
Compare
This PR serves to clean-up the OPcache configurations in opcache.ini.sh.
Removed configurations
These configurations were removed as they are already the defaults in PHP (see PHP OPcache configuration docs):
These configurations were also removed, with justifications:
opcache.fast_shutdown directive was removed since PHP 7.2.0 (see opcache.fast_shutdown configuration). Similar PR:
opcache.enable_cli=1 was removed from Nextcloud's recommended configurations due to it being bad for performance. See issue:
Recommended configurations
These are recommended configurations (see Enabling PHP OPcache - Nextcloud docs):
opcache.save_comments is required by Nextcloud. However, it is also the default value in PHP, therefore removed.
OR
opcache.revalidate_freq is recommended to be set to '60' to revalidate cached scripts every 60 seconds (as opposed to the 2 seconds default in PHP). The revalidation frequency can be disabled by setting opcache.validate_timestamps to '0'.
Other recommended configuration by Nextcloud (undocumented):
Nextcloud have increased opcache.interned_strings_buffer from '8' to '16' to avoid the following error message:
See PR:
Personally, I have tested the configuration by modifying /etc/php/8.1/mods-available/opcache.ini and there were no issues after restarting the service.
However, if any issues arises after restarting the service, I would recommend to clear the file cache in /tmp and then restarting the service.
Note that I have tested this on a Docker instance instead of a bare metal installation.