Avoid heroku server from sleeping

后端 未结 1 1991
孤街浪徒
孤街浪徒 2020-12-05 15:48

I got a website hosted on a Heroku server (i\'m a new to Heroku btw), and as it\'s under the free package, it sleeps after 30m of inactivity, and t

相关标签:
1条回答
  • 2020-12-05 16:03

    It is perfectly legal to keep your free dyno awake for as long as you want, by any means at your disposal. Just note that your monthly allocation of free dyno hours is limited. If you verified your Heroku account with a credit card, you have 1000 free dyno hours per month, which is more than enough to keep a single free web dyno up "forever" without sleeping at all. A very easy way to do that is simply to configure a New Relic add-on for your app (using the free New Relic plan), which you can easily configure to ping your Heroku app periodically. For additional methods to prevent your Heroku app from idling, see here.

    0 讨论(0)
提交回复
热议问题