Hi. We are getting an error on the production server: A process serving application pool (pool name) was orphaned, but the specified orphan action (some action) could not be executed.
I remember someone added something to get a memory dump on application hangs there, but the file in (some action) is no longer there. How do I remove the action associated with it?
Why, you simply remove that something that someone added which is no longer there, of course... :-P
Joking aside, the relevant metabase properties in your situation are:
- OrphanActionEXE - Command to run on orphaning
- OrphanActionParams - Parameters to the orphan action
- OrphanWorkerProcess - Whether to orphan a worker process instead of recycling it
How to find all this? Search with key terms like:
At this point, you have two basic choices to address the error:
- Turn off Orphaning. This stops IIS from orphaning, which also prevents it from running the failing action
- Delete the OrphanActionEXE and OrphanActionParams properties. IIS continues to orphan worker processes but stops running the custom action
Personally, I recommend #1 because Orphaning helps debugging when monitored... and hopefully you find the issues in test environments and do not intend to debug production servers
Now, suppose you want to delete the above Orphaning properties. How to find where they are set, what their current values are, and how to delete them? Use your friend ADSUTIL.VBS. For example, the following illustrate sample management of worker process Orphaning.
REM Identify all AppPools that set OrphanWorkerProcess
CSCRIPT ADSUTIL.VBS FIND OrphanWorkerProcess
REM Retrieve the value of OrphanWorkerProcess at the global level
CSCRIPT ADSUTIL.VBS GET W3SVC/AppPools/OrphanWorkerProcess
REM Delete the OrphanWorkerProcess property for the DefaultAppPool
CSCRIPT ADSUTIL.VBS DELETE W3SVC/AppPools/DefaultAppPool/OrphanWorkerProcess