Azure网站的每个页面加载缓慢 [英] Azure Website each page loading slow

查看:143
本文介绍了Azure网站的每个页面加载缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在azure上托管了一个网站,现在我正在测试槽中进行部署,每次部署后以及如果我很长时间没有访问页面时,我都会遇到问题.每个页面的加载时间约为15秒,如果再次访问,则会在正常时间内加载.我更改了门户中的设置,以使站点始终保持活动状态,但这无法按预期进行.每隔几分钟尝试对网站执行ping操作,但此操作无法再次使用.

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.

推荐答案

部署后,这些页面将在您首次访问任何给定页面(对于整个站点不是一次)时生成并缓存.如果您有公共页面,还可以在web.config中查看应用程序初始化"选项,为您进行热身".

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.

这篇关于Azure网站的每个页面加载缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆