Terminal or Vercel runtime logs
NeonDbError: sorry, too many clients already / remaining connection slots are reserved
- What it means
- Too many database connections were opened at once without pooling or reusing them.
- Likely causes
- Creating a brand-new database client pool on every hot reload in development instead of reusing a single module instance.
- Using the direct database URL instead of Neon's pooled
-poolerconnection URL.
- Prevention
- Define the Neon client once in a shared
lib/db.tsmodule and use the pooled connection URL.
Copy for your agent
The database says `too many clients already`. Check that our database module reuses a single client across hot reloads and uses `@neondatabase/serverless`.
Was this page helpful?