Database Connection Pool Exhaustion
Requests start failing with 'too many connections' or connection timeout errors. Error appears after app runs for a while or under load. Connection pool is exhausted.
Database has limited connections. Without proper connection management, connections leak and pool becomes exhausted.
Error Messages You Might See
Common Causes
- Connections not being closed after use
- Long-running transactions holding connections
- Creating new client per request instead of reusing
- Async operations not awaiting properly
- Connection pool size too small for load
How to Fix It
Reuse Supabase client instance:
// Good - single instance
const supabase = createClient(URL, KEY);
export default supabase;
// Bad - creates new client each request
const client = new createClient(URL, KEY);Keep transactions short. Use connection pooling mode in Supabase Settings.
Real developers can help you.
You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.
Get HelpFrequently Asked Questions
How many connections does Supabase allow?
Default 5 for free tier, increases with plan. Check Settings > Database for current limit.
Should I create new client per request?
No, reuse single client instance. Client handles connection pooling internally.