Skip to content

warning: PHP OPcache module is not properly configured: OPcache buffer is nearly full #1965

@meonkeys

Description

@meonkeys

I'm getting a warning on the Security & setup warnings page (/settings/admin/overview). First I've seen this one. In the past I've seen warnings about string buffers (mentioned in other issues).

Security & setup warnings

It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some warnings regarding your setup.

  • The PHP OPcache module is not properly configured. See the documentation ↗ 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 128.

Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.

Screenshot from 2023-04-08 17-12-51

I'm using:

  • version 25.0.7.1 (also saw this warning with 25.0.5.1)
  • image tag: nextcloud:25.0.5-apache
  • image SHA256 checksum: 1dd8f331fb758655eb3b2e6388b7cff26f2a90dc0bec25f8d2af1dbdbf538234

opcache.memory_consumption is how many megabytes to use in shared memory storage for OPcache. The minimum is 8 and the default is 128.

Questions:

  1. Why might OPcache be running out? Too many apps? Misbehaving apps? Misconfiguration? This is expected, and the default should be changed?
  2. The warning says opcache.memory_consumption should be increased. How much? Is there a reasonable upper bound besides just "however much system memory you can spare"? What's the best practice here?
  3. I don't notice any negative symptoms related to this warning. Should it be less severe than a warning? What kinds of symptoms might I expect to see? If the cache is rank-ordered by usefulness (say, those scripts with the most hits get to stay in the cache, those with the fewest are ejected) maybe I don't care if a few rarely used scripts aren't cached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions