Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

Conversation

@alex-vlasov
Copy link

When we use APC storage there's a chance to get infinite loop if APC was disabled by mistake.
In particular this is happening when you try to update histogram - https://github.com/Jimdo/prometheus_client_php/blob/master/src/Prometheus/Storage/APC.php#L36:

        $done = false;
        while (!$done) {
            $old = apcu_fetch($sumKey);
            $done = apcu_cas($sumKey, $old, $this->toInteger($this->fromInteger($old) + $data['value']));
        }

To prevent this we can introduce additional check for APC storage.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant