PHP opcache warning

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

In the overview section of Nextcloud version 32.05 i get the following warning

PHP opcache

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 “8”..

I have tried to correct this by changing the value of the opcache.interned_strings_buffer in /etc/php/8.2/apache2/php.ini

; The OPcache shared memory storage size.
opcache.memory_consumption=128

; The amount of memory for interned strings in Mbytes.
opcache.interned_strings_buffer=64

Because I did not see any results, I also changed the value of the opcache.interned_strings_buffer in the etc/php/8.2/cli/php.ini file

I still get the warning.

I was wondering where I can change the value to solve this problem?

I have seen previous topics on this subject, and I have tried to find any answer there, but none of the topics is telling exactly which path to follow in order to change the correct file.

Further information about my Nextcloud setup is that i run it as a VM on Proxmox 8.X

In the overview, it stated that I am running Nextcloud Hub 25 Autumn (32.0.5)

It is a Turnkey VM that is running on Linux 6.1.0-42-amd64 x86_64 Operating System

Memory 4GB and Processor is 2

Nextcloud is behind a Reverse Proxy (Traefik version 3.6.4)

Let me know if there is more information needed

Hi, maybe it helps.

My configuration is:

ocache.memory_consumption=128

opcache.interned_strings_buffer=20

And please control that

opcache.enable=1

opcache.enable_cli=1

Thanks!!

I had already found the solution you offered. But still, many thanks to you.

I found out that, indeed, you have to enable the OPcache

The confusing thing is that you have multiple PHP ini files, and it is unclear which one you need to edit. In my case, I edit the apache2/php.ini file

Keep in mind, that PHP works much better when used as FPM and not as module in Apache.

What is FPM?

FPM = FastCGI Process Manager

The basic idea is to run php-fpm as service which also handles OPcache etc. and starts worker processes as needed and let Apache communicate with php-fpm using proxy_fcgi. The advantage is, that you separate the webserver from PHP and that multiple PHP processes can run in parallel.

Also see here:

Thanks for the explanation