Vercel server issue
I deployed a server in vercel it only stays active for 20-30 minutes after that it doesn't show information from the server to the front end anymore
Is it a problem with vercel? What should I do to fix it?
5 Replies
After that it again becomes active after I do the prod command again
Vercel is "serverless" meaning your program is spun up in response to a request, answers that request, and is then shut down.
There's no permanently running server process.
So. The problem is
Well I have a feature where I built that after registration to the website one must wait for the access from the admin to view the website. After that they can view the dashboard that's the main feature of the website.
The dashboard is configured like this.
But when after deploying the the server shows the dashboard only for a few minutes and after that it doesn't show the dashboard anymore.
So even if it's approved and the user is logged in it doesn't work anymore after 20-25 minutes
The dashboard component doesn't get showed anymore
What can be done ?
How are you doing authentication? How is a user logged in?
How do you know they're still logged in after 25 minutes?
Are you printing
isApproved
somewhere in your code?So what I am doing is I am using firebase for authentication. So when a user registers by default i am sending the credentials and the as a boolean value value to the database. Based on this the admin has the ability to make it true or false so when made true it always stays that way. Also yes they are still logged in after 25 minutes because I didnot setup any time to make them logout or something like that also the website shows that they are logged in