Using one drizzle connection per request (Cloudflare + postgres)
When connecting to Drizzle postgres (Neon) through a cloudflare worker. I always get this error on first load.
I think it's due to the
What are some ideas to have one instance per worker?
My workaround is exporting this, but this means every single call to
Will this create a bunch of connections?
I think it's due to the
db being shared between requests.What are some ideas to have one instance per worker?
My workaround is exporting this, but this means every single call to
db.xxxx() will call the drizzle function.Will this create a bunch of connections?