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
here![No description](https://cdn.answeroverflow.com/1215346204045615155/image.png)
Ohh 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
![No description](https://cdn.answeroverflow.com/1215349081455726683/IMG_8740.png)
@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!