TY
PPrisma
•Created by TY on 6/29/2024 in #help-and-questions
Prisma Accelerate - Nextjs Middleware - NextAuth V5 - EDGE_FUNCTION_INVOCATION_TIMEOUT
Hi everyone, I am working on upgrading my implementation of NextAuth to the latest version V5 to improve edge compatibility. Everything is working in my development environment but once deployed to Vercel I am receiving EDGE_FUNCTION_INVOCATION_TIMEOUT in about 20% of my edge middleware requests.
This is using Prisma Accelerate which based on the V5 documentation *should * be compatible. There in an open ticket under the next-auth repo where others had ran into similar issues with various ORM's but based on the comments it seemed it was related to the client initialization and/or edge compatibility. I added a comment (https://github.com/nextauthjs/next-auth/issues/10773#issuecomment-2198257896) with my package.json, Prisma Client initialization including the accelerate extension, and my middleware. Just wanted to see if anyone had successfully implemented Prisma Accelerate + NextAuth V5 + Auth Middleware. I enabled all logging on my Prisma Client but nothing really jumped out as suspicious, in the successful middleware requests I see the succesful POST to accelerate.prisma, in the failed middleware requests, there are no outgoing requests so I am not sure if this points to the client initialization issues? Any insights would be appreciated 😀
This is using Prisma Accelerate which based on the V5 documentation *should * be compatible. There in an open ticket under the next-auth repo where others had ran into similar issues with various ORM's but based on the comments it seemed it was related to the client initialization and/or edge compatibility. I added a comment (https://github.com/nextauthjs/next-auth/issues/10773#issuecomment-2198257896) with my package.json, Prisma Client initialization including the accelerate extension, and my middleware. Just wanted to see if anyone had successfully implemented Prisma Accelerate + NextAuth V5 + Auth Middleware. I enabled all logging on my Prisma Client but nothing really jumped out as suspicious, in the successful middleware requests I see the succesful POST to accelerate.prisma, in the failed middleware requests, there are no outgoing requests so I am not sure if this points to the client initialization issues? Any insights would be appreciated 😀
1 replies