开发者

Weird webpage loading behaviour

开发者 https://www.devze.com 2023-02-22 17:33 出处:网络
I have a website that I\'m hosting on a public IP using IIS 7.0. (using c# asp.net 3.5) I find that if I navigate to the webpage for the first time in a day. It loads endlessly and nothing shows up.

I have a website that I'm hosting on a public IP using IIS 7.0. (using c# asp.net 3.5)

I find that if I navigate to the webpage for the first time in a day. It loads endlessly and nothing shows up. Then when I re-press enter in the address bar, it loads right away and everything works fine.

From then on, when I got to the address again it loads quickly.

I don't think this开发者_JAVA百科 is a compilation issue as all my code is pre-compiled.

Any ideas what might be causing this behavior?

Thanks! Andrew


I had a similar problem which turned out to be caused by the IIS app pool recycling.

In my case, the website had outgrown its hosting package and as soon as it hit the arbitrary memory limit, the app pool was recycled and the application restarted, recompiling on the first page view.

You can check for this by adding a Global.asax and handling the Application_Start event. You could write logs to a database or send an email notification with whatever debug details you want.

I also handle Application_Error which offered up some useful info.

If you notice Application_Start happening several times a day, you may have a memory leak or similar issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消