At a glance
The number of client connections Redis refused in the last 24 hours because the instance had already reached maxclients. Every value above zero is a connection that was turned away: a web node, a worker, or a health check that could not get in. Unlike most metrics this one has no “acceptable” non-zero band; the alert fires at the first rejection because by the time Redis is refusing connections, some downstream service has already failed to do its job. This is the hard, lagging proof that the connection pool was exhausted, the confirmation event behind the Clients vs maxclients % gauge.
Calculation
rejected_connections is a monotonically increasing counter that Redis exposes in INFO stats. It starts at zero on instance boot and only ever goes up; it resets only on restart (or CONFIG RESETSTAT). The card does not display the lifetime counter, it displays the delta over the trailing 24 hours:
- Counter reset on restart. If the instance restarted inside the 24-hour window, the “24h ago” sample is larger than “now”, which would yield a negative delta. The engine detects the reset (a decrease in a monotonic counter) and treats the window as starting from the restart, so a freshly booted instance shows the rejections since boot, not a nonsense negative.
rejected_connectionsis specifically themaxclientsrefusal. It does not count connections dropped for other reasons (a client that disconnected, a protocol error, an auth failure). Those have separate accounting. This counter is the clean signal: “I turned someone away because I was full.”- Cluster and replica connections. On a cluster node the counter reflects only the connections that node refused. A fleet-wide total is the sum across nodes; the card reports per instance so you can find the hot node.
Worked example
A platform team runs self-hosted Redis 7.0 backing session storage for a storefront.maxclients is set to 10,000 in redis.conf, but the host’s ulimit -n was left at the default 1,024, so Redis clipped the effective maxclients to roughly 992 at start-up and logged a warning nobody read. Snapshot taken on 22 Mar 26 at 09:00 GMT, covering the previous 24 hours.
The card shows 2,192 in red. The on-call engineer works backward:
- 2,192 connections were refused in 24 hours. Each one was a real downstream failure: a web request that could not read a session and bounced the user to login, or a worker that crash-looped.
- Why is the cap 992 when the config says 10,000?
CONFIG GET maxclientsreturns 992, not 10,000. The OS file-descriptor limit clipped it. This is the classic mismatch, the team thought they had ten thousand slots and actually had under a thousand. - When did the rejections cluster? Cross-referencing the storefront’s traffic, the rejections all landed during the 18:00 to 21:00 evening peak, when concurrent sessions briefly exceeded 992.
- Zero is the only good value. Unlike latency or memory, there is no “a few rejections is fine” band. The first rejection means real traffic was turned away.
- The config value lies; the effective value is truth. Always confirm
CONFIG GET maxclientsagainstredis.conf. A clippedmaxclientsis one of the most common causes of unexplained rejections. - This card is the receipt, not the warning. By the time it is non-zero, the damage is done. Watch Clients vs maxclients % to act before rejections start.
Sibling cards
Reconciling against the source
Where to look in Redis’s own tooling:For managed services:redis-cli INFO stats | grep rejected_connectionsreturns the lifetime counter. Sample it twice 24 hours apart (or read your monitoring history) to reproduce the card’s delta.redis-cli CONFIG GET maxclientsreturns the effective ceiling. If this is lower than yourredis.confvalue, the OS file-descriptor limit clipped it, the usual root cause.redis-cli INFO clientsshowsconnected_clientsso you can see how close you are to the cap right now. The Redis server log recordsWarning: max number of clients reachedlines with timestamps, giving you the exact moments rejections happened.
ElastiCache / MemoryDB: CloudWatch does not exposeWhy our number may legitimately differ:rejected_connectionsdirectly; watchCurrConnectionsagainst the node-typemaxclientsceiling and the engine log file (slow-log / events) for the reached-cap warning. Azure Cache for Redis: theTotal OperationsandConnected Clientsmetrics in Azure Monitor; rejections surface as failed connection attempts in client telemetry. Redis Cloud (Redis Enterprise): the database metrics view reports connection counts against the subscription limit.
Known limitations / FAQs
The card shows rejections but Clients vs maxclients % is green right now. How? The gauge is real-time with 1-minute smoothing; this card is a 24-hour total. A short, sharp burst hours ago could have hit the cap, refused some connections, and subsided, all before you looked at the gauge. The 24h total preserves the evidence; the live gauge does not. This is exactly why both cards exist. Myredis.conf says maxclients 10000 but I am getting rejections at under a thousand connections. Why?
Almost certainly the OS file-descriptor limit. Redis needs one descriptor per client plus a reserve; if ulimit -n is lower than maxclients + 32, Redis clips the effective maxclients at start-up and logs a warning. Run CONFIG GET maxclients to see the real ceiling, then raise ulimit -n (systemd LimitNOFILE, or /etc/security/limits.conf) and restart.
Can I raise maxclients at runtime to stop rejections?
On self-hosted Redis, CONFIG SET maxclients 50000 works immediately if the OS file-descriptor limit allows it, otherwise it is clipped silently. On managed services the ceiling is fixed by node type and you must scale to a larger node or add a client-side connection pool. Raising the cap stops rejections only if the underlying demand is genuine; a connection leak will refill any headroom.
Does this counter include connections dropped for other reasons?
No. rejected_connections is specifically the maxclients refusal. Connections closed for client disconnects, protocol errors, idle timeouts, or auth failures are accounted for separately and do not appear here. That precision is what makes a non-zero value unambiguous.
Why is the window 24 hours and not real-time?
Because rejections are bursty and brief. A 24-hour total ensures a 3-minute rejection storm at 02:00 is still visible at 09:00 when the team reviews dashboards. The real-time view lives in Connections Rejected Due to maxclients.
My instance restarted overnight. Does that hide rejections from before the restart?
The lifetime counter resets to zero on restart, so rejections from before the restart are lost from Redis itself. The card detects the reset and reports rejections since boot rather than a negative delta. If you need the pre-restart figure, it lives only in the server log (max number of clients reached lines) or your external monitoring history.