Why does my MongoDB Atlas cluster go into sleep mode after 30 minutes of Mean stack app inactivity on Render.com?

270 Views Asked by At

My mean stack connected to mongodb atlas doesn't load after 30 mins of inactivity.

I created a mean stack app connected to atlas cluster and deployed it on render.com. But 30 mins after I stop working on my mean stack app, the home page takes at least a minute to load. Once it does load after a minute's delay, it doesn't cause a delay anymore, but only as long as I keep working on my app. 30 minutes of inactivity later, the homepage load gets delayed again.

My question is, why is my cluster going into this "sleep" mode just because I haven't used the app in the last 20-30 mins? Is there a setting that always keeps the atlas cluster up and running, without causing home page load delays? Am I missing some configuration?

1

There are 1 best solutions below

1
anurag On

Render's free instances types automatically sleep after 15 minutes of activity: https://render.com/docs/free#free-web-services. You can upgrade to a $7/month instance to prevent sleeping.