4

I have a Rails app hosted in Heroku. If I go the the site for the first time, it takes more than 10 seconds to start the app. After that, everything works fine and fast.

What should I do to boost first time loading? Should I add more Web Dynos, or more Worker Dynos, or do something with my configuration?

Thank you.

AdamNYC
  • 19,887
  • 29
  • 98
  • 154

2 Answers2

11

If you are on the free Heroku 1 dyno setup then the dyno will wind down after 1 hour of inactivity.

Should you pay for 1 or more extra dynos then none of you dynos will wind down and you will only ever face the bootup time when you push a new version.

You can choose to install the free New Relic add-on, and you can set this to ping your app every 2 minutes. This will stop it spinning down. http://addons.heroku.com/newrelic

michaelward82
  • 4,706
  • 26
  • 40
2

Heroku unloads your app from memory if it is inactive for a while. See this answer for some suggestions: Why are my basic Heroku apps taking two seconds to load?

Community
  • 1
  • 1
mikewilliamson
  • 24,303
  • 17
  • 59
  • 90