# Redis: ERR max number of clients reached

**Code:** `ERR max number of clients reached` · **Category:** Redis · **Seen on:** Redis, Linux, Node.js

Redis hit its `maxclients` limit (default 10000, lower if the OS limit is low), so new connections are refused.

## Meaning

Find who holds connections: `CLIENT LIST`, `INFO clients`. Typical causes are connection leaks (creating a client per request), no pooling, many app instances × pool size, or `ulimit -n` lowering the effective limit. Reuse a single client/pool, close connections, and raise `maxclients` plus OS limits if justified.

## Common causes

- New client created per request, never closed
- Pool sizes × instances exceed maxclients
- Low `ulimit -n` (effective maxclients lowered)
- Serverless functions opening connections on every invocation
- Zombie connections after crashes

## Quick fix

1. Reuse one client/pool per process
2. `CLIENT LIST` to identify leaks; `CLIENT KILL` idle ones
3. Raise `maxclients` and the OS file-descriptor limit

## Detailed fix by platform

### Linux

1. `redis-cli INFO clients; redis-cli CLIENT LIST | awk '{print $2}' | cut -d= -f2 | cut -d: -f1 | sort | uniq -c | sort -rn | head`

## How to diagnose

1. **Count** — connected_clients?
2. **Source** — Which IPs?
3. **Limit** — maxclients vs ulimit?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/redis/redis-maxclients-reached)
