英文:
Why does my MongoDB Atlas cluster go into sleep mode after 30 minutes of Mean stack app inactivity on Render.com?
问题
我的MEAN堆栈连接到MongoDB Atlas,在30分钟不活动后不加载。
我创建了一个连接到Atlas集群的MEAN堆栈应用,并部署在render.com上。
但是,在我停止使用MEAN堆栈应用30分钟后,主页加载需要至少一分钟的时间。
一旦加载完成并延迟了一分钟后,它不会再次导致延迟,但前提是只要我继续使用应用。30分钟的不活动后,主页加载会再次延迟。
我的问题是,为什么我的集群会因为我在过去的20-30分钟内没有使用应用而进入这种“休眠”模式?是否有一种设置可以始终保持Atlas集群的运行,而不会导致主页加载延迟?我是否忽略了某些配置?
英文:
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
得分: 1
Render的免费实例类型在15分钟的活动后会自动休眠:https://render.com/docs/free#free-web-services。您可以升级到每月7美元的实例以防止休眠。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论