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

后端 未结 5 1149
耶瑟儿~
耶瑟儿~ 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:43

    I had the same problem with every app I have put on via heroku's free account. Now there are options of adding dynos so that your app does not get offloaded while it is not being used for a while, you can also try using redis or memcached for caching. But I used a hacky solution for my small scale project, I basically built web scraper put it inside an infinite loop with sleep and tada the website actually had much better response times(I guess it was not getting offloaded because of the script).

提交回复
热议问题