I have a 400 page nextjs app I've built initially with D1, but D1 was timing out too much so I moved to postgres with planetscale, and now I keep getting 500s from pages and I am about to give up on workers and host it on my infrastructure. I am not really sure to go with this,
I can't really find any stack traces that seem useful, I can't tell what object is causing the issue. I only call 1 api from the backend, I made sure to read the body even on errors
I get this message as well
[ERROR] Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance. (I/O type: RefcountedCanceler)