Hello. I migrated an existing project and added payload to it. When in dev, everything works like a charm. I can access the /admin route, login and do everything payload is supposed to. However, once deployed on vercel, when I try to hit the route /admin, I get an error: This Serverless Function has timed out. Did this happen to anyone else? If so, what was the fix for that? Thank you!
Hi! I guess it could be an issue with the environment variable in Vercel. If you have not defined the MongoDB URL or any other database connection you might be using. You may need to redeploy if you added the env variable after deploying the website.
Thank you for your answer. I validated that my .env variable is present in vercel env variable. Do you have any idea what else could cause this? Tyvm!
Found the issue. I used the database mongodb and in the mongodb atlas I did not set the "Allow Access From Everywhere". So when I was hitting the admin route, payload tried to access my db but could not.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.