Skip to content

opcache used_memory reports negative value #16927

Open
@docjojo

Description

@docjojo
<?php
                var_dump(opcache_get_status()['memory_usage']);
?>

Reports a negative value for used_memory.

used_memory
Image is from a VDS system with opcache.memory_consumption=1GB and several sites.

But issue was reproduced within the following environment:

  • PHP 8.3
  • shared hosting server with PHP-FPM
  • two sites with individual opcache.memory_consumption settings
  • first site: 128M
  • second site: 256M
  • global settings in plesk: 256M

Second site reports correct values, but first site, with lower settings reports negative value for "used_memory"

Changing both sites to dedicated PHP-FPM fixes the issue, but in the default config it fails.

C.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions