prometheus_client_php icon indicating copy to clipboard operation
prometheus_client_php copied to clipboard

Meta info missing for meta key exception

Open mohierf opened this issue 2 years ago • 3 comments

I got this exception just after the restart of my application. I am using apache + php-fpm in a Docker container.

Exception: Meta info missing for meta key: prom:counter:cron_total:meta /app/vendor/promphp/prometheus_client_php/src/Prometheus/Storage/APCng.php 333

To get rid of this error, then only solution was to restart once again. To make some tests, I did a new restart and yet another one and again and agin ... and sometimes the error is raised and sometimes not !

mohierf avatar Aug 22 '23 10:08 mohierf

After some time (around 15 minutes), the problem is back ...

My (simplified) source code:

$adapter = new Prometheus\Storage\APCng();
self::$registry = new CollectorRegistry($adapter);

... / ...

$counter = self::$registry->getOrRegisterCounter('cron', 'total', 'Cron task counter', ['cron']);
$counter->incBy(1, ['releaseActuality']);

Note that I am also using other labels: ['releaseActuality', 'pushNotifications', ...]

mohierf avatar Aug 22 '23 11:08 mohierf

To get rid of this problem I had to downgrade the package version to 2.6.2 !

The problem did not existed in my application before the upgrade to the most recent 2.7.1. Any idea what I should change to be able to upgrade ?

mohierf avatar Aug 24 '23 10:08 mohierf

I'm also seeing this with the APCng adapter.

applovinjake avatar Feb 07 '24 19:02 applovinjake