Sunday, August 10, 2014


One of the main problem on hosting your web applications in Heroku is "idling". Idling is when your web dynos will go down after not having a single visit or connection in 1 hour span.

The solution for this is very easy, just ping your app. But what is the effective or cheapest way of doing it?

As of now, I do have at least 5 web apps hosted in Heroku and at first I am having a hard time on keeping my apps from idling. Here's how I ping my apps simultaneously:


  1. Sign up to SetCronJob.com
  2. Create a php file with this code inside:
    • <?php
      file_get_contents('your_website_here');
      file_get_contents('your_website_here');
      file_get_contents('your_website_here');
      file_get_contents('your_website_here');
      ....
      and so on 
  3. Back to SetCronJob, create a job with 30 minutes pattern
  4. Paste your app url along with the php file you created : sampleapp.herokuapp.com/cron.php
  5. Hit save
That's it!!

Unfortunate for me, I found a very late solution to my problem. You can also use New Relic's monitoring capability to ping your website.  Using SetCronJob only allows you to ping your website for every 30 minutes because of account limitation but here in New Relic it seems every minute it pings your apps. 

Same process but instead of using SetCronJob you can paste your cron url in New Relic's monitoring page.


8 comments:

  1. https://www.easycron.com provides a free plan which allows setting webcron with "10 minutes" minimum interval.

    ReplyDelete
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me..
    I am a regular follower of your blog. Really very informative post you shared here.
    Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai .
    or Javascript Training in Chennai.
    Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai

    ReplyDelete
  3. Thanks you for sharing this unique useful information content with us. Really awesome work. keep on blogging
    python Training in Pune
    python Training in Chennai
    python Training in Bangalore

    ReplyDelete
  4. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    Best Devops Training in pune
    Devops Training in Bangalore
    Power bi training in Chennai

    ReplyDelete
  5. Very well written blog and I always love to read blogs like these because they offer very good information to readers with very less amount of words....thanks for sharing your info with us and keep sharing.

    Data Science course in Indira nagar
    Data Science course in marathahalli
    Data Science Interview questions and answers
    Data science training in tambaram
    Data Science course in btm layout
    Data science course in kalyan nagar
    Data science course in bangalore

    ReplyDelete
  6. Amazing Article ! I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    amazon web services aws training in chennai

    microsoft azure training in chennai

    workday training in chennai

    android-training-in chennai

    ios training in chennai

    ReplyDelete