Most apps on the cloud are sleeping as the platform provider idles an app if there’s not a request for a certain amount of time. Heroku’s threshold is 1 hour. I found several discussions on the web:
- http://stackoverflow.com/questions/5480337/easy-way-to-prevent-heroku-idling
- http://longren.io/heroku-depriving-your-free-dyno-of-sleep/
- https://github.com/alaingilbert/Turntable-API/issues/243
I first tried adding new relic to my heroku app, but it seems an overkill and was a bit involved to get it work.
Then, I found this “Kaffeine” and it worked for me. One limitation is that it’s only for heroku apps. http://kaffeine.herokuapp.com/
For other cloud providers, here are a few alternatives I found.