error when deploy next js full stack to vercel
Hello
I'm facing an issue when i make a fullstack application with next js
when you use getServerSession() from NextAuth in server component
or when you use mongodb and mongoose to fetch something from database
the page takes so much time to load and he gives you this error when you deploy to vercel
This Serverless Function has timed out.
Your connection is working correctly.
Vercel is working correctly.
504: GATEWAY_TIMEOUT
Code: FUNCTION_INVOCATION_TIMEOUT
do any one know the solution for this ?