Project

General

Profile

"Fixing PHP OPcache Configuration Issue in Nextcloud" » History » Version 4

Gareth Eaton, 04/27/2023 09:10 AM

1 1 Gareth Eaton
h1. "Fixing PHP OPcache Configuration Issue in Nextcloud"
2
3
The PHP OPcache module is not properly configured. See the documentation ↗ for more information.
4
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.
5
6
The location of the php.ini file can vary depending on your operating system and PHP installation. Here are some common locations for the file:
7
8
On Linux systems using PHP installed via a package manager, the php.ini file is typically located in /etc/php/<version>/php.ini, where <version> is the installed PHP version (e.g. /etc/php/7.4/php.ini).
9
10
Find the following and set to the below values
11
12
opcache.save_comments = 1
13
14
opcache.revalidate_freq = 60
15
16 4 Gareth Eaton
opcache.interned_strings_buffer=16
17 2 Gareth Eaton
18 3 Gareth Eaton
---
19
20 2 Gareth Eaton
After modifying the php.ini file, you will need to restart your web server or PHP-FPM service for the changes to take effect. This is necessary to ensure that the updated configuration settings are loaded into memory.
21
22
The exact steps to restart the web server or PHP-FPM service may vary depending on your server configuration and operating system. Here are some common commands to restart these services:
23
24
To restart Apache web server:
25
26
<pre>
27
sudo service apache2 restart
28
</pre>