N
Neon2y ago
harsh-harlequin

Pooled connection with Neon serverless driver?

I'm getting a lot of Prepared statement does not exist errors. I'm using Drizzle with the @neondatabase/serverless driver. Should I not be using a pooled connection with this driver? It looks like other people are running into this as well: https://github.com/neondatabase/serverless/issues/53
GitHub
Cryptic prepared statement errors · Issue #53 · neondatabase/server...
Steps to reproduce Unknown (error is sporadic) Expected result ??? Actual result Randomly, I'm seeing cryptic errors like this: | Error: DB error: ERROR: prepared statement "s996" doe...
2 Replies
conscious-sapphire
conscious-sapphire2y ago
Hey, is Drizzle running the prepared statements or are you defining them yourself? For now we recommend setting neonConfig.fetchConnectionCache = true; with the non-pooled connection
rich-copper
rich-copper2y ago
Hey @ShinyPokemon I'm having the same problem, it come and goes, I don't define any prepared statements and I use the neonConfig.fetchConnectionCache = true. I use Vercel with Next, and I see that most of the errors happen at build time on getStaticProps maybe it is related...

Did you find this page helpful?