Nextcloud: OPcache buffer is nearly full

Nextcloud complains about opcache.interned_strings_buffer and opcache.memory_consumption not being large enough, so this is how to adjust them.

4051 views
d

By. Jacob

Edited: 2022-08-10 07:54

There are some warnings regarding your setup.

  • The PHP OPcache module is not properly configured. See the documentation ↗ for more information.

    • The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply opcache.memory_consumption to your PHP configuration with a value higher than 128.
    • 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 8.

This is not really an error, but rather a warning to inform you that your OPcache resources may be running low, and it could be useful to increase the available resources.

The specific options can typically be adjusted in /etc/php/8.0/fpm/conf.d/10.opcache.conf – if the file does not exist, you can try to create it.

You need to adjust opcache.interned_strings_buffer and opcache.memory_consumption. E.g. Just increase their values for now:

opcache.interned_strings_buffer=16
opcache.memory_consumption=256

The conf.d directory is for user-configuration options, whereas direct php.ini modifications could be overwritten doing an update.

Note. The exact location may depend on which linux distribution you are using.

Tell us what you think:

  1. You need to route ocm-provider requests to index.php to have the error go away. The error started showing after I upgraded my Nextcloud server some time ago, and I have not had time to fix it until now.
  2. The Nextcloud notes app is worth using, because it stores notes in a logical and natural way, secures your notes and ensures you will never lose access to them.
  3. This can happen when the Redis environment is configured incorrectly, and/or when the redis-server.sock file has the wrong permissions.
  4. How to toggle maintenance mode on or off for your Nextcloud server
  5. Prevent your Nextcloud data directory from being accessible from the internet.

More in: Nextcloud