Content pfp
Content
@
0 reply
0 recast
3 reactions

welter pfp
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
22 replies
12 recasts
32 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@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 - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@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 pfp
welter
@fun
😅 oh great, learning about serverless right now
0 reply
0 recast
0 reaction