Azure Website each page loading slow

南楼画角 提交于 2020-01-03 21:08:16

问题


I've hosted a website on azure and right now I am deploying on a test slot and I have a problem after each deployment and if I haven't accessed the pages in a long time. Each page loads like 15 seconds and if accessed again loads in normal time. I changed the settings in the portal to keep the site always alive, but that doesn't work as expected. Tried with ping to the website every few minutes, but did not work again.

I thought the build is only once for the whole application, but it looks like that every file is built on-the-go. I am not sure how to fix that, or if it's even what I think it is.


回答1:


The pages will build and cache the first time you access any given page (not once for the whole site) right after deployment. If you have public pages, you can also look at Application Initialization options in the web.config to do the "warm up" for you.



来源:https://stackoverflow.com/questions/36333016/azure-website-each-page-loading-slow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!