• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...
Common Tasks
  • Blog Home
  • Email Blog Author
  • RSS for comments
  • RSS for posts
Search
  • Advanced search options...
Tags
  • .NET Framewor
  • .NET Framework
  • Ajax/Javascript
  • ASP.NET
  • CLR
  • Cool stuff
  • DataAccess
  • Debugging/Windbg
  • Hotfix/Service Pack
  • IDEVDataCollector
  • IIS
  • Internet Explorer
  • Italian techs
  • LogParser
  • OT
  • Personal
  • Productivity
  • Random
  • Scripting/ASP
  • Security
  • Technology
  • Tools
  • Troubleshooting
  • Vista/Longhorn
  • Visual Studio
Archives
Archives
  • November 2010 (1)
  • October 2010 (1)
  • July 2010 (2)
  • April 2010 (1)
  • March 2010 (2)
  • February 2010 (2)
  • January 2010 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (1)
  • July 2009 (5)
  • June 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (3)
  • February 2009 (5)
  • January 2009 (3)
  • December 2008 (5)
  • November 2008 (3)
  • October 2008 (2)
  • September 2008 (3)
  • August 2008 (3)
  • July 2008 (3)
  • June 2008 (5)
  • May 2008 (4)
  • April 2008 (8)
  • March 2008 (4)
  • February 2008 (5)
  • January 2008 (2)
  • December 2007 (4)
  • November 2007 (6)
  • October 2007 (6)
  • September 2007 (8)
  • August 2007 (6)
  • July 2007 (7)
  • June 2007 (10)
  • May 2007 (9)
  • April 2007 (12)
  • March 2007 (8)
  • February 2007 (5)
  • January 2007 (3)
  • December 2006 (1)
  • November 2006 (4)
  • October 2006 (2)
  • September 2006 (9)
  • August 2006 (2)
  • July 2006 (1)

Disable recycling in IIS 7? Use AppCmd

MSDN Blogs > Never doubt thy debugger > Disable recycling in IIS 7? Use AppCmd

Disable recycling in IIS 7? Use AppCmd

Carlo Cardella
22 Apr 2008 10:00 AM
  • Comments 3

I stumbled on this while trying to repro a remote debug problem for a customer: as you might know from this post from Johan, debugging ASP.NET on IIS7 needs some special care about the application pool recycling policy otherwise if you’ll not be fast enough IIS will kill your process.

Well, I was doing some tests and wanted to disable the Regular Time Interval value through the IIS Manager (default for this property is 1749 minutes, i.e. 29 hours):

AppPool Advanced Settings 

But if you try to set the value to zero, I’ll get an error message (at least in Windows 2008 RTM).

Property value error 

Luckily we can still use AppCmd to change our config store, here it is how:

appcmd.exe set AppPool <AppPoolNameHere> /recycling.periodicRestart.time:00:00:00

And if you now go back to the UI you’ll see the change correctly reflected

Regular Time Interval 

Of course you can manually change your applicationHost.config file, but handle it with care and be sure you always have a backup first!

appcmd add backup <BackupNameHere>

Use the Administration Pack

It’s still a preview as of now, but it contains some really interesting new features for the IIS Manager. For example you can select the server node within the Connections left panel and under the Management section you’ll now have a new Configuration Editor feature if you don’t want to use AppCmd or edit the xml file directly:

Configuration Editor 

appSettings 

If you select applicationPools and then enter the (Collection) box, you can change the periodicRestart.time value through the new dialog and from here you can set it to zero without error messages! smile_regular

AppPool properties 

By the way, also note the small hint I highlighted: that means you can set intervals to “00:00:00”, “00:01:00”, “00:02:00” etc…, but not “00:01:30” for example; you’ll get the same from AppCmd too:

AppCmd output 

 

Carlo

Quote of the day:
If someone wants a sheep, then that means that he exists. - Antoine de Saint-Exupery
  • 3 Comments
IIS
Leave a Comment
  • Please add 5 and 4 and type the answer here:
  • Post
Comments
  • Microsoft news and tips &raquo; Disable recycling in IIS 7? Use AppCmd
    22 Apr 2008 11:18 AM

    PingBack from http://microsoftnews.askpcdoc.com/?p=3713

  • PameAlex
    17 Jul 2008 11:12 AM

    Good post, it really helped me a lot :) I couldn't found much information about it and this is exactly what I needed.

    Thanks

  • Jas
    14 Dec 2010 9:36 AM

    Or use this command to edit Global level Recycling option

    appcmd.exe set config  -section:system.applicationHost/applicationPools /applicationPoolDefaults.recycling.periodicRestart.time:"00:00:00"  /commit:apphost

Page 1 of 1 (3 items)
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.402.223