neon coldstarts in vercel edge

hey!! if my neondb is in idle state, and i try to query something -- it will error out. - error node_modules/@neondatabase/serverless/index.js (1527:67) @ eval - error error connecting to server: Connection refused (os error 111) Caused by: Connection refused (os error 111) then if i try again after it's active -- works all good how can i write it in a way to wait for db to activate? context: neonConfig.fetchConnectionCache = true const sql = neon(process.env.DATABASE_URL!) export const db = drizzle(sql) const test = await db.select().from(kyteProd).where(eq(kyteProd.username, id)).then(takeFirst) (same happens without fetchConnectionCache)
1 Reply
aleemrehmtulla
aleemrehmtullaOP17mo ago
seems to work with a directurl, but not with the neon pooler flag in url (with our without pgBouncer in query)
Want results from more Discord servers?
Add your server