Issues with OPcache on shared hoster (All-Inkl)

Hey everyone,

I’m having issues with the OPcache on my shared hoster (All-Inkl, Premium). OPcache should be available here, but it is operating as file cache (“for safety reasons”). According to php_info() it should be up and running:

Opcode Caching                          Up and Running
Optimization                            Enabled
SHM Cache                               Disabled
File Cache                              Enabled
JIT                                     Disabled
Startup                                 OK 

opcache.blacklist_filename              no value
opcache.consistency_checks              0
opcache.dups_fix                        Off
opcache.enable                          On
opcache.enable_cli                      Off
opcache.enable_file_override            Off
opcache.error_log                       no value
opcache.file_cache                      /usr/share/opcachephp81/XXX/
opcache.file_cache_consistency_checks   On
opcache.file_cache_only                 On
opcache.file_update_protection          2
opcache.force_restart_timeout           180
opcache.huge_code_pages                 Off
opcache.interned_strings_buffer         8
opcache.jit                             tracing
opcache.jit_bisect_limit                0
opcache.jit_blacklist_root_trace        16
opcache.jit_blacklist_side_trace        8
opcache.jit_buffer_size                 100M
opcache.jit_debug                       0
opcache.jit_hot_func                    127
opcache.jit_hot_loop                    64
opcache.jit_hot_return                  8
opcache.jit_hot_side_exit               8
opcache.jit_max_exit_counters           8192
opcache.jit_max_loop_unrolls            8
opcache.jit_max_polymorphic_calls       2
opcache.jit_max_recursive_calls         2
opcache.jit_max_recursive_returns       2
opcache.jit_max_root_traces             1024
opcache.jit_max_side_traces             128
opcache.jit_prof_threshold              0.005
opcache.lockfile_path                   /tmp
opcache.log_verbosity_level             1
opcache.max_accelerated_files           10000
opcache.max_file_size                   0
opcache.max_wasted_percentage           5
opcache.memory_consumption              256
opcache.opt_debug_level                 0
opcache.optimization_level              0x7FFEBFFF
opcache.preferred_memory_model          no value
opcache.preload                         no value
opcache.preload_user                    no value
opcache.protect_memory                  Off
opcache.record_warnings                 Off
opcache.restrict_api                    no value
opcache.revalidate_freq                 2
opcache.revalidate_path                 Off
opcache.save_comments                   On
opcache.use_cwd                         On
opcache.validate_permission             Off
opcache.validate_root                   Off
opcache.validate_timestamps             On

Still, I’m getting warnings in the admin-console:

  • The PHP OPcache module is not properly configured.
    • The maximum number of OPcache keys is nearly exceeded. To assure that all scripts can be kept in the cache, it is recommended to apply opcache.max_accelerated_files to your PHP configuration with a value higher than 10000.
    • 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 256.
    • 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.

The parameters in the warning above correspond to the ones given by php_info(). Trying to increase them by means of .user.ini does not have an effect. Does anyone have an idea what could be going wrong here?


System Information

Nextcloud version: 25.0.3
Operating system and version: Ubuntu (unknown version) on shared hoster
Apache or nginx version: Apache (unknown version)
PHP version: 8.1.13

$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  'datadirectory' => '/www/htdocs/xxx',
  'overwrite.cli.url' => 'xxx',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'SNTwG_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'tempdirectory' => '/www/htdocs/xxx',
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'xxx',
  'maintenance' => false,
  'loglevel' => 2,
  'theme' => '',
  '' => 'stable',
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'default_phone_region' => 'DE',
  'has_rebuilt_cache' => true,
  'memcache.local' => '\\OC\\Memcache\\ArrayCache',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'app_install_overwrite' => 
  array (
    0 => 'calendar',
  'updater.secret' => 'xxx',

OK. I just sent an e-mail to All-Inkl asking them about this - here’s what they replied (within one minute!):

Since some values do not quite match what some software asks for, a message still appears in NextCloud. Caching still works, so you can ignore this message.

PHP Memory Cache can only be enabled on your own managed server. But again, this is more of a recommendation, not a basic requirement for using Nextcloud.

(deepl translation)

So … I guess I’ll just have to live with the error message?

To me their answer was pretty clear. So yes, it seems like you have to live with it.

Also, they are right, about these messages not being hard requirements. However, performance will probably suffer without a dedicated PHP memory cache. But things like that are the usual trade-offs when you are using shared hosting platforms. In return, you get a web panel for easy management and a better price to storage ratio, compared to a VPS or a dedicated server.