We have a known leaky application running on our Microsoft Internet Information Services (IIS) 5.0 server. Periodically, we need to restart the server to free up memory. How can we set IIS to restart when not enough memory is available?
Microsoft has provided a useful utility for such situations. The IIS 5.0 Process Recycling Tool (IIS5Recycle.exe) runs as a service on Windows 2000 and lets you schedule restarts according to criteria you provide. For more information about this free tool or to download it, visit http://www.microsoft.com/downloads/release.asp?releaseid=31106.
The tool runs from a command line and has two switches. The command
installs the IIS5Recycle service. The command
brings up the recycle tool's configuration screen, which lets you set the following parameters:
- IIS up time—This parameter restarts IIS after it's been running for the designated number of hours.
- Total HTTP requests served—This parameter monitors the GET Request performance counter and restarts IIS automatically when the counter reaches the threshold you specify.
- Time of day or week—You can set this parameter to restart IIS automatically at a certain time each week. You can enter multiple values for multiple times.
- Virtual memory use—Virtual memory use is the sum of Inetinfo and Dllhost memory use. When these totals exceed the memory limits you set in this parameter, IIS restarts.
- Active Server Pages (ASP) requests queued—This parameter monitors the performance counter for queued ASP requests. When that number exceeds the set number of requests, IIS automatically restarts.
You can also set up the tool to run a program or script before and after the tool recycles IIS, which is useful for running further testing scripts, sending alerts, and making log entries. A reporting-only mode lets you configure the tool to report when it's triggered but to take no other action. I like this feature because you can study the tool's effects before implementing it.
Another useful resource is Microsoft Application Center 2000. Application Center implements health monitoring for Web-based applications and goes well beyond the IIS 5.0 Process Recycling Tool's capabilities.
68% of 1192 respondents to an Instant Poll at www.windowswebsolutions.com have upgraded to IIS 5.0.