6

As is of your knowledge, after 5 minutes of no utilization, Heroku will put to sleep your free dyno instance which will make it the next request slower. [Edit: they sleep after an hour of inactivity.]

Is there a way that I can keep the instance alive? Maybe by making sure the site is always being used?

Thanks.

7
  • 4
    I wrote a script that hit my Heroku hosted site every 30 minutes, which did a good job of keeping the dyno alive. I'd argue this is not the most ethical thing to do (I have since stopped using the script), the real solution would be to pay Heroku for some real hosting. The free option should be willing to accept this limitation.
    – Matt Greer
    Nov 28, 2010 at 15:42
  • 1
    Can you share the script? I don't see why is not ethical. They offer the free instance because they want to, for small websites paying $38/mo is simply outrageous. Thanks.
    – donald
    Nov 28, 2010 at 15:54
  • 5
    Heroku is very expensive, yes. For a fraction of Heroku's cost you can get your own VPS and deploy your rails app there. But Heroku offers serious convenience and polish (deploying to Heroku is wonderfully easy!), and an easier ability to scale. That's what you are paying for with Heroku. Sorry I won't share the script but really a script that hits a website every 30 minutes is easy to write, just do some googling.
    – Matt Greer
    Nov 28, 2010 at 15:58
  • And where do you host the script? In a VPS?
    – donald
    Nov 28, 2010 at 16:11
  • 1
    The real answers to this question are here: http://stackoverflow.com/questions/5480337/easy-way-to-prevent-heroku-idling
    – Arman H
    Nov 17, 2013 at 7:59

0