Files
kolaente 9c939602d7 fix(metrics): store active users as TTL keys in keyvalue to avoid concurrent map access
The active users metric stored the in-process map itself in the memory
keyvalue backend, so the Prometheus gauge iterated the same map that
request handlers were writing to under a different lock, causing
"concurrent map iteration and map write". Store one expiring keyvalue
entry per user/link share instead; the gauge is then just a key count.
This also makes the metric correct across multiple instances on redis.
2026-08-19 17:29:35 +02:00
..