简体   繁体   中英

Rails 4 on Heroku extremely slow with loading

I've got Heroku deployment with my Rails 4 app and it's proving to be extremely slow. I'm not sure if my location has a factor as I'm based in Australia

I've got NewRelic addon and below is the problem that I'm seeing.

Category     Segment                 % Time  Avg calls   Avg Time (ms) 
View         layouts/users Template  98.4    1.0         16,800

Based on this breakdown, I see that layout users is the problem for the performance (which is nearly 16.8 seconds!).

Is there a good way to profile this to find out exactly what functions are causing this problem and what are the best way to fix those?

Also another important thing to note is that when I go to map report it shows End User of 19.5 seconds which takes up a lot of time.

When an app on Heroku has only one web dyno and that dyno doesn't receive any traffic in 1 hour, the dyno goes to sleep.

When someone accesses the app, the dyno manager will automatically wake up the web dyno to run the web process type. This causing delay for this first request.

Are you noticing similar behaviour?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM