Skip to content

"metric connections underflow: previous value: 0, adding: -1" #641

Closed as not planned

Description

@Geal

this log is appearing frequently, there must be a bug when closing sessions

Activity

  1. added this to the 0.14 milestone on Jul 29, 2021
  2. Keksoj commented on Jan 10, 2023

    @Keksoj

    @BlackYoup do you still witness this log appearing often in production?

  3. FlorentinDUBOIS commented on May 2, 2026

    @FlorentinDUBOIS
    Collaborator

    Closing as obsolete.

    The original report (2019, by @Geal) cited a metric connections underflow: previous value: 0, adding: -1 line under load. Since then the metrics subsystem has been substantially rewritten:

    • PR feat: add per-status-code HTTP metrics and buffer pool gauges #1196 (merged) reworked the metrics labelling pipeline (http.errors per-cluster/backend, per-status counters, central metrics.detail filtering) and rewrote lib/src/metrics/mod.rs.
    • The original gauge_add! decrement sites that could have produced the line have been audited as part of the post-h2-mux work; the new SessionManager counters (per-(cluster, source-IP) connection cap shipped in PR feat: add per-cluster per-IP connection limiting #1193) carry their own monotonic / saturating semantics.
    • No metric.*underflow line has been observed in production journals since the rewrite.

    Reopening welcome if a current build emits the line under reproducible conditions; the modern metric paths (incr!, count!, gauge!, gauge_add! in lib/src/metrics/mod.rs) are the place to look.

  4. modified the milestones: v0.16.0, v2.0.0 on May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions