{
  "schema_version": 2,
  "id": "develop/reference/errors/common/err-max-clients",
  "title": "ERR max number of clients reached",
  "url": "https://redis.io/docs/latest/develop/reference/errors/common/err-max-clients/",
  "summary": "The server already has as many connections as its limit allows.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-11-02T15:10:28+01:00",
  "page_type": "content",
  "content_hash": "1da3f210988df5a204b2a98323147591a4c5ef9a20ef81c1348b65edb592ac57",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis returns this error when a new client connects, but the server already has as many connections as its limit allows. The limit is the `maxclients` setting, which is 10,000 by default. Redis sends the error and then closes the new connection.\n\n[code example]\n\nIn a cluster, the connections from other cluster nodes count toward the limit too, and the message is `ERR max number of clients + cluster connections reached`.\n\nIn redis-py, this error is `ConnectionError: max number of clients reached`."
    },
    {
      "id": "how-to-fix-it",
      "title": "How to fix it",
      "role": "content",
      "text": "1. Check how many clients are connected with [`INFO clients`](https://redis.io/docs/latest/commands/info). `connected_clients` shows the number of connections, and `maxclients` shows the limit.\n1. Find out where the connections come from with [`CLIENT LIST`](https://redis.io/docs/latest/commands/client-list). Each line shows a connection's address in `addr`, its name in `name`, and how many seconds it has been idle in `idle`. Many connections from the same app that stay idle for a long time usually mean that the app doesn't close them.\n1. Fix the cause:\n    - **Your app opens a new connection for each request.** Create one client, or one connection pool, when your app starts, and reuse it. For example, see [Connect with a connection pool](https://redis.io/docs/latest/develop/clients/redis-py/connect#connect-with-a-connection-pool) for redis-py.\n    - **Many copies of your app each keep a large pool.** The total number of connections is the pool size multiplied by the number of copies. Make the pools smaller.\n    - **Idle connections never close.** By default, Redis never closes idle connections. Set `timeout` to the number of seconds after which Redis closes an idle connection. See [Client timeouts](https://redis.io/docs/latest/develop/reference/clients#client-timeouts).\n    - **You need more connections.** Raise `maxclients`. Each connection also uses a file descriptor, so check the operating system's limit too. See [Maximum concurrent connected clients](https://redis.io/docs/latest/develop/reference/clients#maximum-concurrent-connected-clients)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "ERR max number of clients reached",
      "section_id": "overview"
    }
  ]
}
