Thursday 26 December 2013

Application pool recycle

Recycling the application pool means recycling the worker process (w3wp.exe) and the memory used for the web application. It is a very good practice to recycle the worker process periodically, which wll keep the application running smooth. There are two types of recycling related with the application pool:
  • Recycling Worker Process - Predefined settings
  • Recycling Worker Process - Based on memory
Recycling Worker Process - Predefined Settings
Worker process recycling is the replacing of the instance of the application in memory. IIS 6.0 can automatically recycle worker processes by restarting the worker processes that are assigned to an application pool and associated with websites. This improves web site performance and keeps web sites up and running smoothly.
Application Pool Creation
Application pool recycling- Worker process
There are three types of settings available for recycling worker processes:
  • In minutes
  • Number of requests
  • At a given time

Recycle Worker Process (In Minutes)

We can set a specific time period after which a worker process will be recycled. IIS will take care of all the current running requests.

Recycle Worker Process (Number of Requests)

We can configure an application with a given number of requests. Once IIS reaches that limit, the worker process will be recycled automatically.

Recycle Worker Process (In Minutes)

If we want to recycle the worker process at any given time, we can do that configuration on IIS. We can also set multiple times for this.
Application Pool Creation
Application pool recycling - Worker process: Time setting
Recycling Worker Process - Based on Memory
Server memory is a big concern for any web application. Sometimes we need to clean up a worker process based on the memory consumed by it. There are two types of settings that we can configure in the application pool to recycle a worker process based on memory consumption. These are:
  • Maximum virtual memory used
  • Maximum used memory
Application Pool Creation
Application pool recycling - Worker process.
At any time, if the worker process consumes the specified memory (at memory recycling settings), it will be recycled automatically.

What Happens During Application Pool Recycling

This is quite an interesting question. Based on the above settings, an application pool can be recycled any time. So what happens to the users who are accessing the site at that time? We do not need to worry about that. This process is transparent from the client. When you recycle an application pool, HTTP.SYS holds onto the client connection in kernel mode while the user mode worker process recycles. After the process recycles, HTTP.SYS transparently routes the new requests to the new worker process

Source : http://www.codeproject.com/Articles/42724/Beginner-s-Guide-Exploring-IIS-6-0-With-ASP-NET#heading0015

1 comment:

  1. 8 best casino bonus codes, codes, bonuses, codes, promotions
    1. 아산 출장안마 BetVictor Casino Sign Up Bonus 2021 - 20 Free Spins. 2. Bovegas Casino Sign 광주 출장안마 Up Bonus 화성 출장샵 2021 - 김포 출장샵 20 Free Spins. 부천 출장안마 3. Unibet Casino Sign Up Bonus 2021 - 50 Free

    ReplyDelete