Drizzle with Next 13.4.2 & Vercel Postgres Timeout

XXexr5/16/2023
Hi all.

I'm trying out NextJS server actions and Drizzle for the first time.

I have it hooked up to Vercel Postgres as the docs describe and all seems to work.

However, after 5 or 6 reads or writes, it seems like the db connection stalls and the serverless / edge function eventually timesout until restarted.

I've enabled drizzle logs and I see the query being fired but then nothing, it stops at that point.

I can't work out what I'm doing wrong and appreciate any suggestions in the right direction.

I wonder if it's some sort of pool issue, but then I'm using the direct vercel/postgres library and suggested drizzle config.

Repo for example here: https://github.com/Xexr/next_test

Deployment so you can see it fail here: https://next-drizzle-test.vercel.app/ (just refresh the page and eventually you'll see it timeout)
XXexr5/16/2023
Having tried a few more things, I think this issue specifically occurs when the component is set to an edge function (via export const runtime = 'edge';). But it should still work in that setup too shouldn't it?
XXexr5/25/2023
For anyone who finds this. I believe the issue is with the drizzle postgres plugin or the vercel storage driver.

I've switched to planetscale mysql, using drizzle and next edge functions and the issue doesn't repeat.
AAlcaponeYou5/26/2023
I would not recommend Vercel's storage solution at all. It's very expensive and unstable.
AAlcaponeYou5/26/2023
If you need the postgres db, just go to NEON yourself and create an account, it takes literally 1 minute.
AAlcaponeYou5/26/2023
The dashboard and query editor on NEON is superior than vercel too