Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: occ setupchecks - OPcache Configuration Checks should not be performed if opcache.enable_cli is disabled #46351

Closed
5 of 8 tasks
adripo opened this issue Jul 7, 2024 · 1 comment · Fixed by #46353
Closed
5 of 8 tasks
Labels
3. to review Waiting for reviews 29-feedback bug feature: occ feature: settings good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@adripo
Copy link

adripo commented Jul 7, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

When running the occ setupchecks command after upgrading to v29.0.3, the following errors related to PHP OPcache configuration are encountered:

✗ PHP opcache: The PHP OPcache module is not properly configured. OPcache is not working as it should, opcache_get_status() returns false, please check configuration.
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 "128"..

It appears that the OPcache checks are being performed even when opcache.enable_cli is disabled. Since OPcache is intentionally disabled for CLI calls by default, these checks should be skipped in this context.

see: nextcloud/docker#2184 (comment)

Steps to reproduce

  1. Run v29.0.3.
  2. Run the occ setupchecks command.
  3. Observe the OPcache related errors.

Expected behavior

The occ setupchecks command should:

Skip OPcache checks if opcache.enable_cli is disabled.
Only perform OPcache checks if opcache.enable_cli is enabled.

Installation method

Community Docker image

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 28 to 29)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

Link to conversation: nextcloud/docker#2184 (comment)

Proposed Solution

  1. Check if opcache.enable_cli is enabled: Before running any OPcache checks, the command should first verify whether opcache.enable_cli is enabled.
  2. Skip checks if disabled: If opcache.enable_cli is disabled (which is a reasonable default and production value), the command should not perform any OPcache checks or return related errors.
  3. Perform checks if enabled: If opcache.enable_cli is enabled, the command can run the OPcache checks for debugging and development purposes.
@adripo adripo added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jul 7, 2024
@solracsf
Copy link
Member

solracsf commented Jul 8, 2024

Agree; same on my instance, it makes no sense checking those if it is disabled on CLI.

@solracsf solracsf added good first issue Small tasks with clear documentation about how and in which place you need to fix things in. 1. to develop Accepted and waiting to be taken care of feature: occ and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 8, 2024
@solracsf solracsf changed the title [Bug]: occ setupchecks - OPcache Configuration Checks [Bug]: occ setupchecks - OPcache Configuration Checks should not be performed if opcache.enable_cli is disabled Jul 8, 2024
@solracsf solracsf added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews 29-feedback bug feature: occ feature: settings good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants