nextcloud / nextcloud/helm

The PHP OPcache module is not properly configured

Open
#327 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

caching
Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

Hi, I'm trying to figure out the proper way to configure OPCache based on the helm chart.

I get the following warning in my administration panel:

The PHP OPcache module is not properly configured. See the [documentation ↗](https://docs.nextcloud.com/server/25/go.php?to=admin-php-opcache) 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 1024.

I am currently trying to configure my OPCache using these configs:

      phpConfigs:
        opcache.conf: |
          php_admin_value[opcache.enable] = 1
          php_admin_value[opcache.save_comments] = 1
          php_admin_value[opcache.interned_strings_buffer] = 1000
          php_admin_value[opcache.memory_consumption] = 1024
          php_admin_value[opcache.max_accelerated_files] = 30000
          php_admin_value[opcache.validate_timestamps] = 0
          php_admin_value[opcache.revalidate_freq] = 60
          php_admin_value[memory_limit] = -1
        uploadLimit.ini: |
          upload_max_filesize = 16G
          post_max_size = 16G
          max_input_time = 3600
          max_execution_time = 3600
          default_phone_region = US
        www.conf: |
          [www]
          user = www-data
          group = www-data
          listen = 127.0.0.1:9000

          pm = dynamic
          pm.max_children = 300
          pm.start_servers = 10
          pm.min_spare_servers = 6
          pm.max_spare_servers = 18
          pm.max_requests = 500
          pm.process_idle_timeout = 10s

My nextcloud.log shows this after startup: Zend OPcache can't be temporary enabled (it may be only disabled till the end of request)

What is the correct way to enable OPCache using the helm chart?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the helm chart's phpConfigs entry, especially the opcache.conf content shown in the issue, and check how those values are applied to PHP. Reproduce the administration-panel warning and the Zend OPcache startup message, then verify the documented configuration is enabled without the error and the warning is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, php
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.