Neon works with local host - errors when deployed to Netlify or Vercel

My deployed app gives me this error: remaining connection slots are reserved for non-replication superuser connections

No issues on local host. I’ve tried both Vercel and Netlify and it’s the same error. Don’t understand why it only happens when the app is deployed. I’m using the node-postgre package. For each SQL query I am creating a client( const client = await pool.connect()) and in the finally block of each function I am doing client.release(). My pool.totalCount never seems to go above 10.

Is this a free tier issue?

I found connection pooling in the docs. Connection pooling - Neon Docs

Now everything works :stuck_out_tongue: