Kurtis Elliott
Kurtis Elliott

Reputation: 39

Rails app Time to first byte very high using heroku

When loading my rails app in production (hosted on heroku) it takes up to 10 seconds to load. This only happens on the very first time the site is loaded. Any subsequent page views load normally. View at kurtiselliott.com

Upvotes: 1

Views: 507

Answers (1)

Kyle Decot
Kyle Decot

Reputation: 20815

This is because Heroku will lazily spin up your dyno which essentially means that the first request will take ~10 seconds. If you leave your app idle for a little while Heroku will spin down your dyno.

See article for full explanation

https://devcenter.heroku.com/articles/dynos#dyno-sleeping

Upvotes: 1

Related Questions