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

huangapple go评论77阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年5月29日 04:10:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76353419.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定