iis 7 - IIS App Pool/Restart and ASP.NET -


we using iis7 host asp.net web-based application. in environment administrators , developers can deploy code application on regular basis.

the new code or app goes dll asp.net bin folder. upon deployment of new dll, iis restarts process, impacting (slowing down) online users.

is there way configure iis run process in background , once ready make switch old state new without impacting users?!

thanks in advance feedback!

iis this, that's recycling about. it's loading dll's while old version of application still running. after completed recycling complete.

however loading dll's part of getting web applications ready, there might initial loads loading/caching user db etc.
these actions not part of recycle process, happen after dll's reloaded , recycling completed.

a while ran issue application had huge startup time due heavy db activity/caching during startup. interested if there functionality allows execute code before recycle marked completed, application first considered recycled when ready run. wanted kind of staging functionality.
in contact iis team regarding issue, sadly they told me no such functionality exists, nor planned.

to solve try following:

  • use alternating deploys:
    setup 2 websites separate application pools. 1 of them live website other 1 staged website. if want deploy changed deploy staged website. after loaded/cached etc. switch url settings of web applications reroute incoming requests live staged one. live 1 becomes new staged , other way around. next deploy go new staged again , on.

update
apparently have created iis module provides functionality now:

iis application warm-up module iis 7.5

the iis team has released first beta test version of application warm-up module iis 7.5. makes warming applications easier described. instead of writing custom code, specify urls of resources execute before web application accepts requests network. warm-up occurs during startup of iis service (if configured iis application pool alwaysrunning) , when iis worker process recycles. during recycle, old iis worker process continues execute requests until newly spawned worker process warmed up, applications experience no interruptions or other issues due unprimed caches. note module works version of asp.net, starting version 2.0.

for more information, see application warm-up on iis.net web site. walkthrough illustrates how use warm-up feature, see getting started iis 7.5 application warm-up module on iis.net web site.

see:

http://www.asp.net/whitepapers/aspnet4

if use asp.net 4 auto start feature:

you can still choose auto-recycle worker processes time time. when that, though, app restart , warm code execute (unlike today - have wait next request to-do that).

the main difference between warm , auto start feature warm module part of recycling process. rather blocking application requests, while running init code.
thing using auto start feature don't have wait user hit page, not case.

see gu's blog post:

http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

update 2:

sadly warmup module has been discontinued iis 7/7.5:

http://forums.iis.net/t/1176740.aspx

it part of iis8 though (it's called application initialization module):

http://weblogs.asp.net/owscott/archive/2012/03/01/what-s-new-in-iis-8.aspx

update 3:

as pointed out in comments warmup module resurfaced iis 7.5 application initialization module iis 7.5 after iis 8 released:

http://www.iis.net/downloads/microsoft/application-initialization


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -