开发者

Avoiding Application Pool Warmup in IIS [duplicate]

开发者 https://www.devze.com 2023-02-07 09:27 出处:网络
This question already has answers here: IIS: web applications warmup (3 answers) 开发者_C百科 Closed 9 years ago.
This question already has answers here: IIS: web applications warmup (3 answers) 开发者_C百科 Closed 9 years ago.

I'm having issues with an ASP.net site (framework 3.5, IIS6 ) having very slow 'first hit' response times. I'm guessing that the issue is to do with the app pool recycling and having to warm up.

I got to thinking. As part of the site I have a HTTP module that spins up a 'never ending loop' on a separate thread which periodically (every 5 seconds) calls an sproc on SQL to make sure the database is still there. I'm wondering if a similar approach might work to get the site to make an HTTP request to "itself" as a keep alive.

My question is, before I go and do this, can anyone think of any reason why it won't work? For example, something like "oh no... ASP.Net will figure out that you're playing with yourself and not go through the whole page lifecycle... etc etc".


You can't reliably have the warmup script inside IIS 6. If the application pools stops, then the HttpModule will never start again (until someone goes to the site). IIS 7 fixes this though with configuration.

I suggest using a script/program on the server, most sharepoint installs need to have one.

A simple script:

http://blogs.msdn.com/b/joelo/archive/2006/08/13/697044.aspx

0

精彩评论

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