Content
@
0 reply
0 recast
2 reactions
welter
@fun
⚠️ FarcasterUserStats.com is down i really need help, this is frustrating ‼️ postgres db connection limit maxed, i have a pool in place, not sure if that actually works or not sql queries to the db should be less than 1-2s max, but now they're going over 15s timing out
18 replies
12 recasts
28 reactions
jtgi
@jtgi
They’re lambdas, you can’t use normal connection pooling because you have no persistent instance to hold connections. You need to switch to a managed Postgres provider: vercel postgres, supabase, or planetscale. https://vercel.com/guides/connection-pooling-with-serverless-functions
1 reply
0 recast
1 reaction
jtgi
@jtgi
I’d do that first. Your current code is creating new connection pools on every non cached request and not releasing them nor reusing them. Welcome to serverless.
1 reply
0 recast
1 reaction
welter
@fun
😅 oh great, learning about serverless right now
0 reply
0 recast
0 reaction