P
Prisma•6mo ago
AbhiAiyer

Server closed connection

Hi! My name is Abhi! I am running a Vercel application with Supabase on a medium sized instance. My connection limit is 3. Pool Timeout is 60. My Vercel max function duration is 300s Before this, I was receiving a huge amount of connection time outs. Now I am being plagued with Server closed the connection. After I upgraded the instance or even restarted the db the problem happens after some time. Could anyone help me understand why this is happening and how to remedy it!
5 Replies
janglad
janglad•6mo ago
Just to be sure, did you use the right URLs to connect to Supabase? Direct should end with 5432, regular with 6543
AbhiAiyer
AbhiAiyerOP•6mo ago
Yep I am using the Pooler uri on 6543
Nurul
Nurul•6mo ago
Hey 👋 Can you try using metrics preview feature and check if there are any idle connections causing this issue? You should be able to get these stats via metrics https://www.prisma.io/docs/orm/prisma-client/observability-and-logging/metrics
No description
AbhiAiyer
AbhiAiyerOP•6mo ago
Where do I call this metrics endpoint? After queries are executed? Do I expose an api route in my Vercel app to do call this? Supabase informed that during this period the logs Thu Jun 06 2024 21:20:13 UTC could not send end-of-streaming message to primary: SSL connection has been closed unexpectedly Thu Jun 06 2024 21:00:22 UTC could not send end-of-streaming message to primary: SSL connection has been closed unexpectedly Thu Jun 06 2024 21:00:22 UTC could not send end-of-streaming message to primary: SSL connection has been closed unexpectedly
Want results from more Discord servers?
Add your server