Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response
I'm running into this issue with Neon, Next-on-pages (Cloudflare) with the new edge (without accelerate) release. I see the documentation here (https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-vercel#neon) that says I should setup the prisma client via:
However I would like to use this across many files, how should I setup the singleton pattern (or do I even need to?)
This is what's making me think that it's an issue on how I'm connecting up to the DB - (https://community.cloudflare.com/t/error-cannot-perform-i-o-on-behalf-of-a-different-request/617112/2)
Here is my code in
/db.ts
Any help would be much appreciated!
(And the full error coming from CF workers):
Prisma
Deploy to Vercel Edge Functions & Middleware
Learn the things you need to know in order to deploy an Edge function that uses Prisma Client for talking to a database.
1 Reply
If anyone else runs into this issue, check out this comment, I've run into another issue so need to confirm if it works, but nonetheless: https://discord.com/channels/595317990191398933/846453104382836766/1219244879868334080 (CF's discord)