Why are my basic Heroku apps taking two seconds to load?

后端 未结 5 1296
耶瑟儿~
耶瑟儿~ 2020-11-30 17:50

I created two very simple Heroku apps to test out the service, but it\'s often taking several seconds to load the page when I first visit them:

  • Cropify - Basic
5条回答
  •  时光说笑
    2020-11-30 18:36

    I am having the same problem. I deployed a Rails 3 (1.9.2) app last night and it's slow. I know that 1.9.2/Rails 3 is in BETA on Heroku but the support ticket said it should be fine using some instructions they sent me.

    I understand that the first request after a long time takes the longest. Makes sense. But simply loading pages that don't even connect to a DB taking 10 seconds sometimes is pretty bad.

    Anyway, you might want to try what I'm going to do. That is profile my app and see how long it takes locally. If it's taking 400ms then something is wrong. But if I get 50ms locally and it still takes 10 seconds on Heroku then something is definitely wrong.

    Obviously, caching helps but you only get 5MB for free and once again, with ONE person using the site, it shouldn't be that slow.

提交回复
热议问题