Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Application recycling can significantly increase the overall stability of your COM+ applications by offering a quick fix for known problems and helping to protect against unexpected ones. For example, application performance can degrade over time because of problems such as memory leaks, nonscalable resource usage, and process failure. COM+ provides application recycling as a solution to these problems. You can use application recycling to automatically shut down a process and restart it, thus reinitializing a failing process and reallocating memory it uses.
Application recycling works by creating a duplicate of the Dllhost process associated with an application. This duplicate Dllhost process services all future object requests, which leaves the old Dllhost to finish servicing the remaining object requests. The old Dllhost process is shut down when it detects the release of all external references to objects in the process or when the expiration time-out value is reached. Through this behavior, application recycling ensures that a client application does not experience a service interruption.
Note
You cannot recycle a COM+ application that has been configured to run as a Windows service. Also, library applications have the recycling and pooling properties of their host process.
You can configure application recycling administratively, by using the Component Services administrative tool, or programmatically, through the COM+ Administrative SDK. You can recycle processes based on several criteria, determined by the following properties of a COMAdminCatalogObject object in the Applications collection:
Additionally, the RecycleExpirationTimeout property of the COMAdminCatalogObject object is used to force the shutdown of a recycled process. It indicates the number of minutes to wait for the release of all external references to objects in the recycled process before forcibly shutting down the process. The valid range is 1 through 1440 minutes (24 hours), and the default expiration time-out is 15 minutes. This value is used only when it is already determined that a process will be recycled based on the other criteria.
You can select more than one criterion for recycling an application. COM+ recycles the application after the first of the set of criteria is satisfied. You can set the expiration time-out value to determine how long an old Dllhost process can spend completing remaining service requests before being forcibly shut down.
The ApplicationInstances collection provides the HasRecycled property, which provides a way to determine whether the application has ever been recycled.
Please sign in to use this experience.
Sign in