artprima / prometheus-metrics-bundle

Symfony 5/6 Prometheus Metrics Bundle
MIT License
129 stars 29 forks source link

apcu lost data #30

Closed InboxViktorV closed 3 years ago

InboxViktorV commented 3 years ago

Steps to reproduce:

  1. Open any page
  2. Open /metrics page (you will see metrics)
  3. Wait about 1min
  4. Refresh /metrics
  5. Data lost (on 1.4.0 there is blank screen, on 1.5.0 there is only one record - php_info{version="7.4.13"} 1)

Is it a bug? Or may some configs are not configured for apcu?

If using Redis such bug is not represented.

InboxViktorV commented 3 years ago

Config:

apcu

APCu Support => Enabled Version => 5.1.19 APCu Debugging => Disabled MMAP Support => Enabled MMAP File Mask =>
Serialization Support => php Build Date => Dec 8 2020 11:29:45

Directive => Local Value => Master Value apc.coredump_unmap => Off => Off apc.enable_cli => On => On apc.enabled => On => On apc.entries_hint => 1 => 1 apc.gc_ttl => 3600 => 3600 apc.mmap_file_mask => no value => no value apc.preload_path => no value => no value apc.serializer => php => php apc.shm_segments => 1 => 1 apc.shm_size => 32M => 32M apc.slam_defense => Off => Off apc.smart => 0 => 0 apc.ttl => 0 => 0 apc.use_request_time => Off => Off

denisvmedia commented 3 years ago

Prometheus Metrics Bundle is just a wrapper around promphp/prometheus_client_php. So, such questions should be addressed to the developers of that library. But as I may judge, it's a not a problem of that lib either. The real cause can be cache overflow, or restart of your pod (if you run it in K8s). If you don't know how to solve it, please refer to the official APCu documentation.

Please let me know if you still believe that the problem is caused by the bundle itself. In this case I will need more detailed information.