Prisma query failing in NextJS deployment
I have a NextJS project which is using prisma and Planetscale. I have a webhook from Stripe where I read from one table and then write to another. The first prisma query always seems to fail. I have added other random queries before it, but it is always the first one which fails. After that failure/timeout (~5mins) the next request always runs instantly. When running locally everything works totally fine, but it always fails when deployed.
I am using global.prisma to ensure there is only one PrismaClient in the entire project (as described here)
I think this might be connection pool issue because the error message is this (but I'm not sure why this would be the problem):
0 Replies