I have a very simple rails 3.2.6 app. I've used Heroku for years to host prototypes, always on the free tier. I finally added a paid dyno on my latest app, and added New Relic to monitor performance.
I'm seeing 4500+ms request times on extremely simple pages with near-zero traffic (we haven't launched yet). New Relic says 99% of this time is spent rendering the template. This is a 75-line completely static haml template inside a 100-line layout. The application template has standard - if current_user.nil?
branches.
I haven't added page caching yet. I'll do this of course, but I'd like to determine the root cause of this very poor performance before I cover it up. Any tips? What sort of response times should I expect from Heroku? On my local box in development env, the same page response time is 26ms (with assets coming in before 1.5s). New Relic reports my dynamic pages on Heroku getting average response times of 2000ms to 6000ms.
Edit: I have page caching turned on for static / and am now seeing averages of 173ms. But I'm still concerned with my abysmal averages on dynamic pages.
As the comments have also said, my guess is because on the first hit in a while Heroku will have to spin up the app (in the case of free apps) to serve the request, which can make your average requests times quite slow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With