aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings
diff options
context:
space:
mode:
authorMichaIng <micha@dietpi.com>2023-01-20 21:59:30 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-01-23 09:47:31 +0000
commit22459ff1595687e807dda3614d9ca761649b9238 (patch)
tree9f02507b0e8c43cd36ea64e23019b4f3c7d0d20a /apps/settings
parenta3898a1843797041d8c8b9f08d7e239124a0dd59 (diff)
downloadnextcloud-server-22459ff1595687e807dda3614d9ca761649b9238.tar.gz
nextcloud-server-22459ff1595687e807dda3614d9ca761649b9238.zip
Fix interned strings buffer check if 0 free bytes
With #32902 it was meant to be avoided to recommend raising the interned strings buffer size above a quarter of the total OPcache size. This works as long as there is at least 1 byte free, but does not apply if the buffer is filled completely. This commit switches the conditions so that the interned strings buffer size must be smaller than a quarter of the total OPcache size for the warning to be shown. That the buffer must be either filled completely or by more than 90% remains untouched. Signed-off-by: MichaIng <micha@dietpi.com>
Diffstat (limited to 'apps/settings')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 752e127fa15..70eac9a7ac4 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -524,11 +524,11 @@ Raw output
}
if (
- empty($status['interned_strings_usage']['free_memory']) ||
+ // Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size
+ ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4) &&
(
- ($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9) &&
- // Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size
- ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') < $this->iniGetWrapper->getNumeric('opcache.memory_consumption') / 4)
+ empty($status['interned_strings_usage']['free_memory']) ||
+ ($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
)
) {
$recommendations[] = $this->l10n->t('The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply <code>opcache.interned_strings_buffer</code> to your PHP configuration with a value higher than <code>%s</code>.', [($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?: 'currently')]);