// troubleshooting guide · upstash

Upstash ERR Max Concurrent Connections Exceeded

Status
Workaround available
platforms:
AWS Lambda, Vercel Functions, Node.js
updated:
November 15, 2026
reports:
2
Method
how we research
Share

RUNBOOK · upstash/max-concurrent-connections4 FIXES

// quick answer

Too many TCP clients are open at once, usually because each serverless invocation opens a new ioredis connection and never closes it. Create and quit() the client per request, or switch to the REST-based @upstash/redis client, which has no connection limit problems.

Most likely fix: Close connections in serverless handlers

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Close connections in serverless handlers

    1. 01Create the client inside the handler: new Redis(process.env.REDIS_URL)
    2. 02Run your commands
    3. 03Call await client.quit() before returning (adds roughly 4ms)
    Did this fix it?
  2. FIX 2Switch to the REST client

    1. 01npm install @upstash/redis
    2. 02Use Redis.fromEnv() with UPSTASH_REDIS_REST_URL / TOKEN
    3. 03HTTP calls don't hold connections
    Did this fix it?
  3. FIX 3Find leaks in long-running apps

    1. 01Reuse one shared client per process instead of one per request
    2. 02Check CLIENT LIST counts against your instances
    Did this fix it?
  4. FIX 4Ask for a higher limit

    1. 01Email support@upstash.com with your database ID and peak connection count
    Did this fix it?

Symptoms

New clients can't connect and logs show '[ioredis] Unhandled error event: ReplyError: ERR max concurrent connections exceeded', typically under load on AWS Lambda or Vercel functions.

Why it happens

  • C-01Serverless functions each open a TCP connection that stays open
  • C-02Client created at module scope and never closed across many cold starts
  • C-03Connection leaks in long-running workers

// this guide also covers

  • upstash max concurrent connections exceeded
  • err max concurrent connections exceeded
  • upstash too many connections lambda

Still not working?

If Upstash keeps failing, you're not alone. See every Upstash problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch Upstash Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other Upstash errors

All 11 Upstash errors and fixes →