Skip to content

Commit

Permalink
do not display the buffer_size info if the size is already set to a c…
Browse files Browse the repository at this point in the history
…ertain threshold

Signed-off-by: szaimen <[email protected]>
  • Loading branch information
szaimen committed Jun 16, 2022
1 parent 0c14ee6 commit cd3d7ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/settings/lib/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,12 @@ protected function getOpcacheSetupRecommendations(): array {
}

if (
empty($status['interned_strings_usage']['free_memory']) ||
($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9)
// Do not display this error if the buffer_size is already set to 16 MB or higher
(!$status['interned_strings_usage']['buffer_size'] >= 16 * 1024 * 1024) &&
(
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')]);
}
Expand Down

0 comments on commit cd3d7ce

Please sign in to comment.