My Node.js Express site will deploy successfully and function as normal for a few minutes, and then it will simply freeze up and not send anything back to the browser. This is not a problem with my code, I used to use Heroku until they announced to shut down their free plan and it worked flawlessly.
From what I have seen, a site that is inactive for 15 minutes will go offline, but when someone requests that page, it should take 30 seconds to start up and serve requests again as normal.
Why, when the app has gone offline, does the server never send anything back if I request again?
Edit: I should also add that I am not getting any sorts of errors in my console, or anything.
That’s not a problem or error on Render. Free plan have an automatic suspend after 15 minutes of inactivity.
Web Services on the free plan are automatically spun down after 15 minutes of inactivity. When a new request for a free service comes in, Render spins it up again so it can process the request.
This can cause a response delay of up to 30 seconds for the first request that comes in after a period of inactivity.
The size of the build will definitely have an impact of the time it takes to come back after sleeping - I’ve seen lightweight services come back in less than 10seconds - if you’re having problems I’d recommend reaching out to us directly via the “Contact Support” link at the bottom of our dashboard and we can investigate further,