After login opcache.interned_strings_buffer

Nextcloud version 28.0.2
Operating system and version Ubuntu 20.04.6 LTS with Plesk Obsidian 18.0.59
Apache or nginx version FPM nginx
PHP version 8.3.3

The issue you are facing:

The PHP OPcache module is not properly configured. The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply “opcache.interned_strings_buffer” to your PHP configuration with a value higher than “32”… Weitere Informationen findest du in der Dokumentation :arrow_upper_right:.

Is this the first time you’ve seen this error? (Y/N): Y

The following values ​​are set:

opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
opcache.revalidate_freq = 60
opcache.interned_strings_buffer=32

After increasing the value, the error message disappears. After logging in again the message appears again.

Well, then it’s probably being used, so increase it even more :wink: Mine is at 64MB and I never saw the message again. Note that the optimal opcache values depend on many factors, and there is no one-size-fits-all solution. You may have to experiment a bit to find the optimal settings for your instance.

Also, this has been discussed here many times, and I doubt anyone can add anything that hasn’t already been said. So please try the search, or the docs if you want to read more, or maybe start with the following thread: https://help.nextcloud.com/t/opcache-memory-consumption-insane-values-needed-by-nextcloud

1 Like

Hello @bb77,

I made the following settings:

opcache.memory_consumption=256
opcache.max_accelerated_files=15000
opcache.revalidate_freq=2
opcache.interned_strings_buffer=200
opcache.save_comments=1

Error message remains.

I now have Nextcloud version 28.0.3.

It seems that no matter what I set, just a few seconds later nextcloud 28 is asking for more.

The PHP OPcache module is not properly configured. The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply “opcache.interned_strings_buffer” to your PHP configuration with a value higher than “128”

The linked page Server tuning — Nextcloud latest Administration Manual latest documentation does not provide any recommendations for that value.

Did anybody find a working opcache configuration? This is what I’m currently using (as recommended in section “Enable PHP OPcache” of the page I’ve linked above):

php_admin_value[opcache.save_comments] = 1
php_admin_value[opcache.revalidate_freq] = 60
php_admin_value[opcache.validate_timestamps] = 0
php_admin_value[opcache.jit] = 1255
php_admin_value[opcache.jit_buffer_size] = 128M
php_admin_value[opcache.interned_strings_buffer] = 128

edit: I’m using PHP 8.1 fpm

I’ve created a minimal script.
/path/to/cloud/opcache_status.php:
<?php echo "<pre>" . print_r(opcache_get_status(), true) . "</pre>"; ?>

While analysing the opcache growth I realised that configuring the size of the interned_strings buffer in fpm pool configuration doesn’t change a thing. It seems, that when you’re using php8.1-fpm, it has to be done in /etc/php/8.1/fpm/php.ini.

I knew that the cache would be shared but I was kinda hoping, that the values of the pool configurations would be added to the global value.

edit: changing the value in fpm/php.ini solved the issue for me

1 Like

I used this minimal script and it works but you have to put it as an exclusion in .htaccess otherwise opcache_status.php will not load.

I can confirm that changing the value in fpm/php.ini to 32 solved the issue for me with Nextcloud 29.