Python Beem Project: Heroku Trick You Shouldn't Use? 🤔 Part 8

in #codeonsteem2 months ago


I have been using heroku to deploy my python flask app.

It is great for small personal projects, testing / experimenting something because it is Free to use and easy to deploy apps on to heroku.

But the downside with the free version (Free Dyno) is that there is a down time.
It is more like sleeping mode.
When there is no traffic coming to the site or no activities in 30 minutes, the site goes to sleep.
The site is still accessible while it is sleeping. It just take 20 sec to wake up and respond to a request.
So the first time I access my site takes a log time which it okay since I don't access my site all the time and I am using their service for free.
But it is kind of annoying sometimes...

Heroku free dyno

  • 550 free dyno hours a month
  • It will sleep if no web straffic in a 30 min period.
  • dyno hours will be consumed when the site is up.

How to check free dyno hours?
There is a command you can use: heroku login -> heroku ps -a app name

Free dyno hours quota remaining this month: 468h 17m (85%)
Free dyno usage for this app: 55h 12m (10%)
For more information on dyno sleeping and how to upgrade, see:
=== web (Free): gunicorn app:app (1)
web.1: up 2020/08/26 09:20:04 -0700 (~ 1h ago)

Or go to heroku billing page and check the usage

Free dyno that won't sleep?

If you don't want your site to go to sleep and you don't want to wait 20 seconds to wake up the site so that you can access the site quickly?
I thought about upgrading my free dyno to hobby dyno so it won't sleep and it will work like a regular website, but I am not sure if I will keep going with my project or stay with heroku so I don't want to spend money yet...

Just put your app name in there and this service will ping your site every 30 minutes to keep your site active.

This will eat up the free dyno hours since the site will always up, but I will try this service for a while. The worst case scenario, my site will be out of free hours and go down, but my site is nothing critical so I think I am okay with that 🤣

If you want to quit this service, just go here and you can remove your site.

Get Rewarded For Browsing! Are you Brave?

happy tears
➡️ Website
➡️ Twitter