Getting Connection closed. randomly
We have been using Vercel/Next.js/Prisma for a bit and in one specific spot we have
When we use
- Changing the connection string from
- Decreased the
Even after that, I see the requests end after 13.something seconds (always less than 14s). I don't have any hard limit in Vercel with 14s, so trying to understand why the variables above are not working or what I can do. Thanks
prisma.salesOrder.findMany() including a bunch of other tables (not ideal I know). When we use
order by in this operation, we get "Connection closed.". Things I have done so far:- Changing the connection string from
connect_timeout=15&connection_limit=20&pool_timeout=60 to connect_timeout=60&connection_limit=30&pool_timeout=0- Decreased the
QUERY_BATCH_SIZE from 1000 to 500Even after that, I see the requests end after 13.something seconds (always less than 14s). I don't have any hard limit in Vercel with 14s, so trying to understand why the variables above are not working or what I can do. Thanks
