TFS, Visual Studio, SQL Server, BizTalk, SharePoint, .Net, and more ...
Many clients I have worked with simply use the IISReset.exe command to recycle applications. Although this may have the desired affect sometimes, there are many alternatives that are better. By no means is this an exhaustive list but will give you some options when a specific website is causing problems (i.e. hung, OOM). Stopping a website doesn't reset memory or the worker process it just stops the website from processing the requests. Therefore, the website "start/stop" actions are not listed below.
Single Web Application "resets"
- Recommended: Recycle the application pool of the specific website's application pool. With Windows Server 2003 SP1 the command line is iisapp.vbs: Reference: http://blogs.iis.net/chrisad/archive/2006/08/30/Recycling-Application-Pools-using-WMI-in-IIS-6.0.aspx. You can use a process id /p or an application id with /a.
Examples:
D:\WINDOWS>iisapp /p 596 /r
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Application pool 'DefaultAppPool' recycled successfully.
D:\WINDOWS>iisapp /a DefaultAppPool /r
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Application pool 'DefaultAppPool' recycled successfully.
Reseting ALL websites on a server (not recommended)
- Start and stop specific services for web services only (do not do the start commands if you are not recycling)
NET STOP W3SVC
NET STOP HTTPFilter (if having problems with SSL)
NET START HTTPFilter (if having problems with SSL)
NET START W3SVC
- Use IISReset /NOFORCE , this causes the system to not forceable terminate the internet services if timeout or error occurs. Note: this will reset all IIS services that are enabled: FTP, NNTP, WWW, IISAdmin, etc.
- IISReset (without /NOFORCE) causes a forceable stop if doesn't respond within 60s (the stop default can be changed via command line). This may lead to IIS configuration loss (http://support.microsoft.com/kb/286196). Note: this will reset all IIS services that are enabled: FTP, NNTP, WWW, IISAdmin, etc.
- Reboot the server. Not recommended and may cause signficant data loss. Note: this attempts to shutdown or forcably shutdown all applications on the server not just IIS related.
- Power cycle the server. Not recommended and may cause signficant data loss. Note: this is extremely dangerous and only to be used when all other options (even one's not listed above) have been tried.
Hope this helps ...
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using