3 ms·
Heroku docs do say (and I'm afraid the link to it is escaping me) that if you run only 1 dyno, it will shut down after something like 6 hours of inactivity. So
by greghinch 13y ago
Heroku docs do say (and I'm afraid the link to it is escaping me) that if you run only 1 dyno, it will shut down after something like 6 hours of inactivity. So if no one hits your site for 6 hours, the next time someone does it has to boot the dyno up again, which can take enough time for the request to time out.
Not saying this is a great policy, just explaining in case you weren't sure. When you go to 2 dynos they keep things up for you presumably because now you're a paying customer.
- calgaryeng 13y agoI think it is much less than 6 hours. Like 30 mins or so.
- ceejayoz 13y agoThis can be mitigated by having cron hit your site every few hours. There are some free cron services like https://www.setcronjob.com/ https://www.setcronjob.com/ that do this.
- Fuzzwah 13y agoWelcome to the cloud, where you need to rely on a third party service to keep your other third party service online. Of course, what happens when setcronjob.com goes down.... well you then use pingdom to check that it is up...... down the rabbit hole we go!
- goldfeld 13y agoWelcome to the web, where you get an easy hosting service like Heroku without paying a dime and then complain about how you need to put some effort to hack the system so you can continue to pay nothing.
- yesimahuman 13y agoJust to be clear: I am paying $70/mo for SSL and Postgres, so it's not that I'm paying nothing. However, based on the minimal server requirements for my app (most users are using our client-side Javascript tools), one dyno "should" be enough.
- ceejayoz 13y agoI really can't blame Heroku for spinning down non-paying instances that don't get a single hit in 6 hours.
- nasalgoat 13y agoI completely agree, but sometimes third party tools are better than baking in-house, especially single purpose services. App crash analytics for example, or performance trending tools like NewRelic. But cron? That's just ridiculous.
- thruflo 13y agoOr enable availability monitoring with the (free) newrelic addon.
- yesimahuman 13y agoMy app is pretty highly trafficked, there isn't a 6 hour window of inactivity anywhere from my logs. What about it running out of RAM?
- greghinch 13y agoI've not seen that issue, I suppose it's possible, without knowing more about your app it's hard to say. I only know of the 1 dyno thing, that's what people most commonly run into when they are trying to run a free app.