Watch: Fix Postgres "too many connections" error in Supabase | Vovy

Watch Vovy do it on a Mac: "Supabase keeps saying too many clients, fix my database connections". Vovy finds why your serverless app is opening too many database connections and switches it to Supabase's connection pooler so traffic spikes stop failing.

"Supabase keeps saying too many clients, fix my database connections"

Vovy finds why your serverless app is opening too many database connections and switches it to Supabase's connection pooler so traffic spikes stop failing.

What happens in the video

  1. Find the connection errors: Vovy checks Supabase Postgres logs for "sorry, too many clients already" or "remaining connection slots are reserved".
  2. Explain why serverless hits this: Every serverless function can open its own connection. Two hundred visitors can mean two hundred connections, more than a small database allows.
  3. Get the pooler connection string: It clicks Connect in your Supabase project and copies the transaction pooler string on port 6543, a shared lobby for connections.
  4. Switch your app to the pooler: Cursor updates DATABASE_URL in your code and Vercel, and turns off prepared statements if your ORM, like Prisma, needs it for transaction mode.
  5. Show connection usage: Vovy opens the database Reports and shows a card with active connections before and after the change.
Read the step-by-step guide