What this sprint fixes
- Application using direct connections (port 5432) instead of the Supavisor pooler (port 6543)
- Connection ceiling exhausted at modest traffic
- 500 errors during peak traffic from refused connections
Your Supabase project hits its connection ceiling during peak traffic. Each Edge Function, each API route, and each client-side query opens a direct connection on port 5432 instead of borrowing one through the Supavisor pooler on port 6543.
For teams whose Supabase application crashes under moderate load because direct database connections exhaust the connection limit. Every one of these is a configuration problem, not a Supabase limitation.
Each Edge Function or API route opens a new Postgres connection on port 5432. The connection lives for the duration of the invocation but is never reused, and a serverless platform that scales out runs many of them at once. A modest burst of concurrent requests drains the pool, and the next request is refused.
A backend or ORM pointed at the direct connection string opens a fresh connection for every worker instead of borrowing from the pooler. Twenty clients with two workers each is 40 backend connections consumed before any other server-side code runs.
Serverless traffic routed through session mode (port 5432) pins a backend connection for the entire client session, even while idle. Transaction mode (port 6543) returns the connection the moment each transaction commits, so a small pool serves far more concurrent clients.
Best fit when your app runs fine at low traffic but crashes or returns 500 errors during peak hours.
The default Supabase setup works for development.
We fix the connection configuration, tune the pool size, and load test well past your current peak.
Map every connection point in your application: Edge Functions, API routes, the client SDK, migration tools, background jobs, and admin tools. Identify which use direct connections versus the Supavisor pooler, and which pool mode each one needs.
Migrate all application connections to the Supavisor pooler endpoint (port 6543) in transaction mode. Keep migrations and admin tools on session mode or direct (port 5432). Proof release: backend connection usage under 30 at current traffic.
Tune the pool size for your peak concurrency and split it across connection types: Edge Functions, long-running API calls, and Realtime each get appropriate limits. Load test well past your current peak with connection monitoring.
Connection usage dashboard with alerts before the pool runs out. Runbook for connection troubleshooting. Pooling configuration guide for the team.
Connection pooling that holds your peak traffic on the same compute instance.
We know how Supavisor behaves in transaction and session mode, and where Supabase's hosted pooler differs from a self-hosted pgBouncer.
Transaction mode and session mode have different implications for prepared statements, advisory locks, and session variables. Supavisor transaction mode does not reliably support named prepared statements, so paths that need them move to session mode or a dedicated pgBouncer pooler. We pick the right mode per connection type, not a blanket setting.
Development has one user making sequential queries. Production has many concurrent users making parallel queries, and a serverless platform spins up a new instance, and a new direct connection, for each one. Without the pooler, that traffic drains the connection pool and Postgres starts refusing new connections.
Usually no. A bigger compute instance raises the connection ceiling, but without pooling that ceiling just moves: more direct connections only delays the next crash. Routing traffic through the Supavisor pooler in transaction mode lets a small backend pool serve many concurrent clients on the instance you already have.
Supavisor transaction mode reassigns backend connections between queries, so named prepared statements (common in ORMs like Prisma) are not reliably available. We route those specific paths through session mode (port 5432) or a dedicated pgBouncer pooler, or disable statement caching on that client. Most Supabase apps do not depend on named prepared statements and run fine in transaction mode.
Serverless functions open a new connection on every invocation and a platform that scales out runs many at once. Without pooling, that drains your connection pool. We route all serverless connections through the Supabase Supavisor pooler in transaction mode (port 6543), so each invocation borrows a connection for one transaction and returns it instead of holding its own.
Yes. We set up monitoring that tracks active backend connections, pool utilization, and client wait time. Alerts fire as the pool approaches capacity. You get a dashboard showing connection patterns by time of day, so you can anticipate growth and resize the pool before users hit errors.
Supavisor is Supabase's own pooler, written in Elixir, and is now the default shared pooler; legacy pgBouncer is deprecated and lives on only as the dedicated pooler for paid plans. The shared Supavisor pooler is IPv4-compatible and runs session mode on port 5432 and transaction mode on port 6543. We configure whichever pooler your project runs and tune the settings for your workload.
At the limit Connection limit being exhausted at peak
A connection pooling fix that lets your app hold its peak traffic without upgrading your Supabase plan.
Fixed scope, fixed price.
ByKostadin StambolievFounder and Imaginator
Published Updated