IIS 5 & IIS 6
Worker process not shutting down after recycle
Last post Dec 10, 2008 03:24 AM by WenJun Zhang - MSFT
Dec 03, 2008 08:12 AM|ghanashyaml|LINK
We have been having this issue for sometime now. On our production server, we have enabled scheduled worker process recyling, i.e. once every 24 hours. Environment is IIS 6, Asp.Net 2.0, Worker process Isolation mode.
Whenever this recycle occurs, we see this warning that the worker process exceeded the time limits for shutdown. And since the Orphaned worker process feature is enabled, the worker processes remain in memory. Net searches suggest using Debug Diagnostics
indicating that the problem is with the application. However, we have tried attaching the Crash and Hang rules using Debug Diagnostics, but my deployment team says, they are unable to get the dump file generated even when the worker process becomes orphaned.
They even tried a forceful recycle.
Problem now is that these worker processes cannot be killed (get access denied errors), nor do they get cleared by IIS restart. Only a OS restart seems to clear them out. Any workaround this behavior?
We know we can disable the Orphaned process feature but we would want to get a dump file first before disabling that feature.
Team says that the worker processes don;t seem to be Hung or Crashed after the recycle but just not shutting down. Manual crash dump may
The application is using lots of Named Mutexes (using "Local\" + somename) and Monitors. I have gone through the code several times and debugged it but could never reproduce this behavior on our local and test enviroments.
I could locate one issue somewhere on net where Managed wrapper of Mutex in .Net does not work properly if Opening/Closing is done very frequently, on Win2003. Workaround seems to be to use CreateMutex instead. But since I am using the Managed Mutex class,
how I can be sure that the Managed class is doing CreateMutex vs Opening/Closing?
Any help is appreciated!
W3wp shutdown issue
Dec 10, 2008 03:24 AM|WenJun Zhang - MSFT|LINK
To answer your question about dump creation, you should be able to achieve it simply with DebugDiag. Do you use the wizard of capturing crash or hang dump. Instead, select the Processes tab and locate those problematic worker processes. Right-click to create
full user dumps of them.