cpboyce6
DTDrizzle Team
•Created by cpboyce6 on 3/25/2025 in #help
Hitting connection limits using Pgbouncer
I am connecting to my Supabase DB from my NextJS app hosted on Vercel and am pretty consistently hitting the max client connections when using PgBouncer.
I have upgraded my Supabase project to use the IPV4 extension so that I can use the dedicated pooler, and I am running an XL DB. I am wondering if I am just initializing the DB incorrectly and am not properly releasing connections to the pooler? I also recently switched to the vercel fluid ocmpute model in hopes of releiving this issue. The postgres url being used is that of the dedicated pooler on port 6543!
Curious if I need to update the way I am connecting in order to release connections back to the pooler? Or if my app traffic is just needed a larger DB.
Any guidance would be appreciated! Here is my current instantiation of the db client that I reference throughout my code:
2 replies