Neon "Remaining Connection Slots Are Reserved" (Too Many Connections)
Quick answer
The compute hit its max_connections limit. Switch the app to the pooled connection string (host with -pooler), close idle connections, or use a larger compute.
Most likely fix: Use the pooled connection string
How to fix it
Try these in order — the most common fix is first.
1. Use the pooled connection string
- In the Neon Console click Connect and enable Connection pooling
- Use the host that contains -pooler in the app's DATABASE_URL
- PgBouncer accepts up to 10,000 client connections
Did this fix it?2. Close idle and long-running connections
- Reuse a single client or pool per process
- Find stuck sessions with SELECT * FROM pg_stat_activity; and end them
Did this fix it?3. Increase compute size
- Project, Branches, Edit compute, raise the max CU
- Larger computes allow more connections (4000 cap at 9 CU and above)
Did this fix it?4. Pooling already on?
- Contact Neon Support about raising default_pool_size
Did this fix it?
Symptoms
Error: 'remaining connection slots are reserved for roles with the SUPERUSER attribute', often in serverless functions under load.
Why it happens
- Serverless functions each open their own direct connection
- max_connections scales with compute size (112 on 0.25 CU, 450 on 1 CU, 901 on 2 CU)
- Leaked or idle connections in the app
This guide also covers
- neon too many connections
- neon remaining connection slots are reserved
- neon pooler connection limit
Still not working?
If Neon keeps failing, you're not alone. See every Neon 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 usThe same problem in other apps
Other Neon errors
- Neon Connection Timeout After Scale to Zero (Cold Start)
- Neon Compute Time Quota Exceeded (Free Plan Limit Reached)
- Neon Free Plan Storage Limit Reached (Writes Blocked)
- Neon Cannot Create Branch: Branch Limit Reached
- Neon Prisma or Drizzle Migration Fails (Pooled Connection)
- Neon SSL Required Error (Connection Is Insecure)
- Neon "The Endpoint ID Is Not Specified" / Password Authentication Failed
- Neon "Active Endpoints Limit Exceeded" / Compute Suspended