Search code examples
iisapplication-pool

questions about IIS application pool configuration


I have some questions about IIS application pool configuration.
I know that idleTimeout specifies how long a worker process should run idle if no new requests are received and the worker process is not processing requests. After the allocated time passes, the worker process should request that it be shut down by the WWW service (taken from here). My question is when and how the worker process starts when a request arrives after it shut down?

Other question is what is the difference between application pool recycling and between shut down? Does it better to recycke instead of shut down and then start again?


Solution

  • When and How worker process starts? When a new request comes in IIS spins a new process for the app pool your website is running under.

    The difference between shutting down and recycle is that during a recycle a new process is started for the app pool in parallel, while the existing process is still serving an existing request. Any new requests that come in are handled by the new process. So in effect you do not loose any request that come in and any existing requests are not prematurely dropped. In a shutdown, you will loose the requests while the app is down.

    To see this live in action - open task manager, select processes tab and see IIS spin up the app pool processes and notice the behavior between a shutdown and recycle. During a recycle for a brief moment you will see two processes for the same app pool.

    See this video for a better understanding : http://dotnetslackers.com/articles/iis/IIS-Overlapping-App-Pools-Week-16.aspx