Home > Windows Server Tips > Web Management > When and how to use worker process recycling with IIS
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEB MANAGEMENT

When and how to use worker process recycling with IIS


Brien M. Posey, Contributor
11.19.2007
Rating: -3.33- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Web applications have long presented a special kind of problem for systems administrators. Often times, an application that works fine in a lab environment tends to be problematic in a production environment.

The reason why this is a problem for admins has to do with simple politics. The application developers often won't admit fault, because the application worked fine when they tested it. From their point of view, the administrator must have misconfigured the server that hosts the application.

From the systems administrator's standpoint, though, they are being asked to host an application that they know nothing about. The Web server itself is working fine prior to publishing the application, so any problems that occur later on must be related to the application.

In the years that I have been working with Internet Information Services (IIS), I have seen these types of situations develop into heated battles time and time again. Often, however, a little research reveals that the application works fine under a moderate workload. But when the server starts receiving an excessive number of requests, the application consumes more and more server resources until problems result.

In these types of situations, occasionally resetting an application can release the resources that the application has consumed, thus preventing the resource consumption from becoming problematic. Fortunately, you don't have to reset Web applications manually. You can configure IIS to recycle (reset) worker processes automatically.

When to use worker process recycling

I first want to point out that you shouldn't depend on this to act as a substitute for writing good code, nor should it be a substitute for fixing a buggy application. There are, however, a number of situations when you can -- and should -- implement worker process recycling.

Worker process recycling is a particularly effective technique in the following situations: Th


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Web Management
Internet Information Services (IIS) sees big changes in Windows Server 2008
How to keep IIS logs from filling up your server hard drives
A first look at Internet Information Services 7.0
Fix app problems stemming from Firefox as default browser
Control users' Internet access
Raise Web server performance in Windows Server 2003
Remotely administer IIS with HTML tool
INDEX.DAT tool helps admins see what users browsed in IE
Improving Internet browsing performance
Check updates on a Web site

Windows Server Monitoring and Administration
Top five Server Core management tips for Windows 2008
Top free tools for Windows server administration
Windows Server 2008 Learning Guide
A quick guide to Server Manager for Windows Server 2008
Moving dynamic disks to a new Windows server
A first look at Storage Explorer for Windows Server 2008
Tips for Windows domain controller optimization
Take control of server clusters with Microsoft's ClusDiag tool
Analyze server history with new tool in Windows 2008
Determining the cause of Windows server hang

Microsoft Internet Information Services (IIS)
Internet Information Services (IIS) sees big changes in Windows Server 2008
How to keep IIS logs from filling up your server hard drives
A first look at Internet Information Services 7.0
Free security tools that can improve IIS security
New IIS 7 security adds value to Windows Server 2008
How can I prevent Internet access with Windows SBS?
Windows Process Activation Service in IIS 7.0
How to use Microsoft's IIS Diagnostics Toolkit
How to install the Microsoft IIS Diagnostics Toolkit
How to use SSL Diagnostics 1.0 to identify issues in IIS

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
IIS  (SearchWindowsServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


e other thing you need to know is that worker processes are linked to application pools. This is important because if an application pool contains multiple Web applications, then recycling worker processes will effect each application in the pool.

Configuring worker process recycling

With that in mind, you can configure worker process recycling by opening the Internet Information Service Manager and navigating through the console tree to your server, application pool, then to the application pool that you need to modify. Next, right click on the application pool, and select the Properties command from the resulting shortcut menu. When you do, Windows will display the application pool's properties sheet, as shown in Figure A.

Figure A
[IMAGE]

As you can see in the figure, the majority of the options related to recycling worker processes can be found on the properties sheet's Recycling tab. This tab allows you to recycle worker processes at specific times or in specific time intervals. You also have the option of recycling worker processes after a specific number of requests or when the application pool has consumed a specific amount of memory (physical or virtual).

Although this tab is the primary repository for settings related to worker process isolation, there are some important settings found on the other tabs. For example, if you look at Figure B, you can see that there is a setting that allows you to automatically shut down a worker process once it has been idle for a specific period of time. This allows you to terminate processes that have locked up or that are not being used because requests are not being made against the server.

Figure B
[IMAGE]

The Health tab, shown in Figure C, allows you to define what it means for a worker process to be healthy. The first setting on this tab tells IIS to ping worker processes every 30 seconds (the time period is adjustable). If the worker process responds to the ping, then it is assumed to be functional.

The next group of settings on this tab are related to rapid fail protection. Essentially, this means that you can tell IIS that if multiple processes fail within a certain length of time, then you should assume that something has gone horribly wrong and shut down the application pool. By default, five failures in five minutes will trigger an application pool shutdown.

The final two settings found on the Health tab allow you to specify the maximum amount of time that a worker process can take to start up or to shut down.

Figure C
[IMAGE]

Remember, worker process recycling isn't a magical cure all for buggy applications, but in some instances, it can mean the difference between a production Web application doing its job -- or experiencing severe performance and stability problems.

[TABLE]

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts