Vercel Edge Runtime + Supabase + Drizzle, 15 seconds server lags + Trpc
When deploying on vercel with lambda everything is extra smooth.
With vercel edge runtime a lot of things are not quite working
One of those things are my transactions. The db < - > server trip is very fast.
but the server < - > client takes 15seconds +
Am I doing something wrong with this transaction?
1. When I remove the transaction and write the same code without it, it works as expected
2. Works perfectly on lambda
3. works perfectly locally
5 Replies
Hello, @Jaaneek! You should use
db
instead of ctx.db
hereOhh sorry, I copy pasted it with a mistake. I had db.insert in there before. Still the same problem
Edit: fixed it in the example
@solo can you spot any other mistakes? ❤️
@Jaaneek honestly, I can't spot any mistakes then:))
Yeah I think supabase & edge vercel are just not ready to work together and something in drizzle transaction breaks them 😦
Thanks for checking it out!