Technologies/Redis/redis.clients.connected
RedisRedisMetric

redis.clients.connected

Number of client connections
Dimensions:None
Available on:OpenTelemetryOpenTelemetry (1)DatadogDatadog (1)Native (1)PrometheusPrometheus (1)

Summary

Reports the current number of client connections to Redis, excluding connections from replicas. This is a foundational metric for capacity planning and detecting connection leaks. When approaching maxclients (redis.memory.maxmemory or configuration limit), new connections will be rejected. Sudden drops may indicate mass disconnections or network issues, while gradual increases without corresponding decreases suggest connection leak patterns.

Interface Metrics (4)
OpenTelemetryOpenTelemetry
Number of client connections
Dimensions:None
DatadogDatadog
Number of client connections
Dimensions:None
Native
Number of client connections (excluding replica connections)
Dimensions:None
PrometheusPrometheus
Number of client connections
Dimensions:None
Related Insights (5)
Redis Connection Pool Starvation from Blocking Patternswarning

When async endpoints make synchronous Redis calls, they hold connections longer than necessary while blocking the event loop, causing artificial connection pool exhaustion even when Redis server capacity is available.

Redis Connection Saturation Stalls Async Event Loopcritical

When Redis connection pool exhausts under high concurrency, blocking Redis operations (even from async endpoints) stall the FastAPI event loop, causing serial-like request processing and tail latency spikes despite low CPU utilization.

Connection Rejection Cascade From Maxclient Saturationcritical

When Redis reaches maximum client connections (redis.connections.rejected increasing), new connection attempts fail silently while existing connections continue working normally, creating intermittent failures that are difficult to diagnose from application metrics alone.

Blocked Clients Indicate Synchronous Operation Bottleneckwarning

Increasing redis.clients.blocked count indicates clients waiting on blocking operations (BLPOP, BRPOP, BRPOPLPUSH, BLMOVE, BZPOPMIN, BZPOPMAX), which can cause connection pool exhaustion if client timeouts are too long or if producers aren't keeping up with consumers.

Client Output Buffer Limits Causing Disconnectionswarning

When Redis disconnects slow clients that can't keep up with output buffer, redis.clients.connected drops suddenly. This is often caused by clients with slow network connections or blocking on their end, especially for pub/sub subscribers or replicas.