Application Pool Terminating Unexpectedly

Last post 08-18-2007 8:28 AM by gokilarajan. 7 replies.

Sort Posts:

  • Application Pool Terminating Unexpectedly

    01-23-2006, 11:19 AM
    Hi all,

    I have a VERY simple asp.net 2.0 (I hesitate to even call it an application) that I recently converted to the 2.0 framework.  About 8-10 times a day, my application pool is dying unexpectedly.    The symptoms that I am experiencing are identical to those described at:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;911816

    To try to alleviate this issue, I have implemented the following:

    1).  The KB article above describes the process of modifying the source code for the IHttpModule.  I have done this and have implemented it.  When I throw a test exception, this module does it's job (very nicely I might add).  However, it is not catching the exceptions that are causing the pool to die.

    2).  I have added the <legacyUnhandledExceptionPolicy enabled="true" /> flag to the machine.config (as prescribed by the KB article).  This doesn't seem to have any affect as the pool is still dying.

    3).  I have added exception handling to my global.asax.  Still no luck, although it does catch exceptions that I test throw.

    My application does one thing in code-behind and that is send a simple e-mail message using.  I don't suspect the component however as I have used it in the past and it is now compiled with the 2.0 framework.  Additionally this site only generates 1 - 2 e-mails a week so that component isn't really being used all that much.

    To be honest, from this applications stand-point I could care less if it dies and restarts when it needs to.  HOWEVER, I feel like I need to understand this issue and how to address it before I start to convert my other ten 1.1 applications that do implement a lot of code-behind, etc...  I don't want to get into a production situation where my user state is dying in the middle of a user session and I don't have any real remedy on how to fix it.

    Any guidance on what to try next would be appreciated.

    Thanks,
    Mike

  • Re: Application Pool Terminating Unexpectedly

    01-23-2006, 10:27 PM
    • Member
      90 point Member
    • tmarq
    • Member since 06-11-2002, 2:44 PM
    • 42
    • Posts 18
    • AspNetTeam

    Is the module installed in the root web.config file? 

    The one at %WINDIR%\Microsoft.NET\Framework\v2.0.50727\config\web.config.

    Thanks,
    Thomas

  • Re: Application Pool Terminating Unexpectedly

    01-24-2006, 9:04 AM

    Hello Thomas,

    No, the module is installed in the application's web.config file (as suggested by the KB article).

    Should I install it in the root web.config?

    Thanks,
    Mike

     

  • Re: Application Pool Terminating Unexpectedly

    01-24-2006, 1:28 PM
    • Member
      90 point Member
    • tmarq
    • Member since 06-11-2002, 2:44 PM
    • 42
    • Posts 18
    • AspNetTeam

    The root web.config applies to all applications, and there is a possibility putting it there might help you.

    <legacyUnhandledExceptionPolicy/> belongs in %WINDIR%\Microsoft.NET\Framework\v2.0.50727\aspnet.config.

    If the module continues not to catch the exception, can you do the following?

    0) Install the current build of Windows Debugging Tools from http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

    1) ntsd.exe -g -G -p <pid>, where pid is the process id for worker process (w3wp.exe/aspnet_wp.exe).

    When an unhandled exception occurs and breaks into ntsd:

    2) .sympath SRV*c:\windows\symbols*http://msdl.microsoft.com/download/symbols

    3) r

    4) k

    5) .loadby sos mscorwks

    6) !clrstack

    Please send the output from these commands if you need help with further analysis.

    Thanks,
    Thomas

     
  • Re: Application Pool Terminating Unexpectedly

    01-24-2006, 4:08 PM
    I downloaded the debugging toolkit and have attached to the process with WinDbg.  I'm assuming this is OK to attach with WinDbg.  (please let me know if not). 

    When I get an exception I will enter the commands you have provided and will provide the output.

    Mike

  • Re: Application Pool Terminating Unexpectedly

    01-24-2006, 7:11 PM

    Here is the output from ntsd, see end of message (not from Windbg as posted earlier).  I'm not sure if this it what you were expecting, but my site would not respond until I terminiated ntsd.

    These two errors were also in the event log

    Warning - A process serving application pool 'DotNextFx20a' exceeded time limits during shut down. The process id was '5300'.

    and then...

    Information -
    A worker process with pid '5300' that serves application pool 'DotNextFx20a' has been determined to be unhealthy (see previous event log message), but because a debugger is attached to it, the World Wide Web Publishing Service will ignore the error.


    Microsoft (R) Windows Debugger  Version 6.5.0003.7
    Copyright (c) Microsoft Corporation. All rights reserved.

    *** wait with pending attach
    Symbol search path is: SRV*c:\windows\symbols*http://msdl.microsoft.com/download
    /symbols
    Executable search path is:
    ModLoad: 01000000 01005000   c:\windows\system32\inetsrv\w3wp.exe
    ModLoad: 7c800000 7c8c0000   C:\WINDOWS\system32\ntdll.dll
    ModLoad: 77e40000 77f42000   C:\WINDOWS\system32\kernel32.dll
    ModLoad: 77ba0000 77bfa000   C:\WINDOWS\system32\msvcrt.dll
    ModLoad: 77f50000 77fec000   C:\WINDOWS\system32\ADVAPI32.dll
    ModLoad: 77c50000 77cef000   C:\WINDOWS\system32\RPCRT4.dll
    ModLoad: 77380000 77412000   C:\WINDOWS\system32\USER32.dll
    ModLoad: 77c00000 77c48000   C:\WINDOWS\system32\GDI32.dll
    ModLoad: 77670000 777a4000   C:\WINDOWS\system32\ole32.dll
    ModLoad: 64700000 6472d000   c:\windows\system32\inetsrv\IISUTIL.dll
    ModLoad: 761b0000 76243000   C:\WINDOWS\system32\CRYPT32.dll
    ModLoad: 76190000 761a2000   C:\WINDOWS\system32\MSASN1.dll
    ModLoad: 10000000 102c5000   C:\WINDOWS\system32\xpsp2res.dll
    ModLoad: 5a390000 5a3e8000   c:\windows\system32\inetsrv\w3core.dll
    ModLoad: 5a420000 5a431000   C:\WINDOWS\system32\IISMAP.dll
    ModLoad: 647b0000 647d7000   C:\WINDOWS\system32\IisRTL.DLL
    ModLoad: 71c00000 71c17000   C:\WINDOWS\system32\WS2_32.dll
    ModLoad: 71bf0000 71bf8000   C:\WINDOWS\system32\WS2HELP.dll
    ModLoad: 62da0000 62da7000   c:\windows\system32\inetsrv\LONSINT.dll
    ModLoad: 76f50000 76f63000   C:\WINDOWS\system32\Secur32.dll
    ModLoad: 71c40000 71c98000   C:\WINDOWS\system32\NETAPI32.dll
    ModLoad: 77d00000 77d8c000   C:\WINDOWS\system32\OLEAUT32.dll
    ModLoad: 5b640000 5b658000   C:\WINDOWS\system32\strmfilt.dll
    ModLoad: 67150000 67159000   C:\WINDOWS\system32\HTTPAPI.dll
    ModLoad: 77da0000 77df2000   C:\WINDOWS\system32\SHLWAPI.dll
    ModLoad: 5a400000 5a408000   c:\windows\system32\inetsrv\W3CACHE.dll
    ModLoad: 5a300000 5a307000   c:\windows\system32\inetsrv\W3TP.dll
    ModLoad: 5a3f0000 5a3f6000   c:\windows\system32\inetsrv\W3COMLOG.dll
    ModLoad: 5a360000 5a36d000   c:\windows\system32\inetsrv\w3dt.dll
    ModLoad: 60ba0000 60bb1000   c:\windows\system32\inetsrv\wamreg.DLL
    ModLoad: 71bb0000 71bb9000   C:\WINDOWS\system32\WSOCK32.dll
    ModLoad: 6d0f0000 6d110000   c:\windows\system32\inetsrv\iisres.dll
    ModLoad: 777b0000 77833000   C:\WINDOWS\system32\CLBCatQ.DLL
    ModLoad: 77010000 770d6000   C:\WINDOWS\system32\COMRes.dll
    ModLoad: 77b90000 77b98000   C:\WINDOWS\system32\VERSION.dll
    ModLoad: 608f0000 60901000   C:\WINDOWS\system32\ADMWPROX.DLL
    ModLoad: 68000000 6802f000   C:\WINDOWS\system32\rsaenh.dll
    ModLoad: 76b70000 76b7b000   C:\WINDOWS\system32\PSAPI.DLL
    ModLoad: 60060000 60066000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspne
    t_filter.dll
    ModLoad: 78130000 781cb000   C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1
    e18e3b_8.0.50727.42_x-ww_0DE06ACD\MSVCR80.dll
    ModLoad: 5a320000 5a332000   c:\windows\system32\inetsrv\w3isapi.dll
    ModLoad: 71b20000 71b61000   C:\WINDOWS\System32\mswsock.dll
    ModLoad: 76ed0000 76ef9000   C:\WINDOWS\system32\DNSAPI.dll
    ModLoad: 76f70000 76f77000   C:\WINDOWS\System32\winrnr.dll
    ModLoad: 76f10000 76f3e000   C:\WINDOWS\system32\WLDAP32.dll
    ModLoad: 76f80000 76f85000   C:\WINDOWS\system32\rasadhlp.dll
    ModLoad: 685b0000 685ba000   C:\WINDOWS\system32\inetsrv\gzip.dll
    ModLoad: 71bd0000 71be1000   C:\WINDOWS\system32\mpr.dll
    ModLoad: 60070000 60075000  
    \\?\c:\windows\microsoft.net\framework\v2.0.50727\a
    spnet_isapi.dll
    ModLoad: 6a2a0000 6a2ec000  
    \\?\c:\windows\microsoft.net\framework\v2.0.50727\w
    ebengine.dll
    ModLoad: 76920000 769e4000   C:\WINDOWS\system32\USERENV.dll
    ModLoad: 79000000 79045000   C:\WINDOWS\system32\mscoree.dll
    ModLoad: 79e70000 7a3d1000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscor
    wks.dll
    ModLoad: 7c8d0000 7d0d3000   C:\WINDOWS\system32\shell32.dll
    ModLoad: 77420000 77523000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Cont
    rols_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
    ModLoad: 790c0000 79ba6000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\msco
    rlib\f9ae0e74d1b4624a8535acacea22cb97\mscorlib.ni.dll
    ModLoad: 7a440000 7abfe000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em\ebd4759c79238d4a81b40340638e36bb\System.ni.dll
    ModLoad: 685c0000 6910a000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Web\73191b169f87b846b89da5bff9502f84\System.Web.ni.dll
    ModLoad: 64890000 6497e000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Configuration\cd44fd0cb062064b96d51baa8bf0743f\System.Configuration.ni.dll
    ModLoad: 69be0000 6a148000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Xml\ec343e75cf38e84098f10176e20545de\System.Xml.ni.dll
    ModLoad: 77e00000 77e22000   C:\WINDOWS\system32\NTMARTA.DLL
    ModLoad: 5ccf0000 5ccff000   C:\WINDOWS\system32\SAMLIB.dll
    ModLoad: 5e600000 5e6ba000   C:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.
    0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll
    ModLoad: 02080000 02088000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tempo
    rary ASP.NET Files\root\6305de30\45de6ad5\App_Code.xp5utk6h.dll
    ModLoad: 020c0000 020c8000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tempo
    rary ASP.NET Files\root\6305de30\45de6ad5\App_global.asax.cnamsv0s.dll
    ModLoad: 79060000 790b3000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscor
    jit.dll
    ModLoad: 695a0000 697da000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Web.Mobile\c81c491cc9f3a64198f920eef7a00903\System.Web.Mobile.ni.dll
    ModLoad: 02100000 02108000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tempo
    rary ASP.NET Files\root\6305de30\45de6ad5\assembly\dl3\30c5ca63\2394b509_cb0cc60
    1\UnhandledExceptionModule.DLL
    ModLoad: 02110000 02118000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tempo
    rary ASP.NET Files\root\6305de30\45de6ad5\App_Web_r0yog7xg.dll
    ModLoad: 69890000 698d0000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Web.RegularE#\0f902675600de945ad6359c97bd20395\System.Web.RegularExpressions.
    ni.dll
    ModLoad: 7ade0000 7af74000   C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Syst
    em.Drawing\ff789e4e797e494cae35deecc1ad6c87\System.Drawing.ni.dll
    ModLoad: 76cf0000 76d0a000   C:\WINDOWS\system32\iphlpapi.dll
    ModLoad: 5f270000 5f2c9000   C:\WINDOWS\system32\hnetcfg.dll
    ModLoad: 71ae0000 71ae8000   C:\WINDOWS\System32\wshtcpip.dll
    ModLoad: 5e380000 5e409000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\diasy
    mreader.dll
    (14b4.13a0): CLR exception - code e0434f4d (first chance)
    (14b4.13a0): C++ EH exception - code e06d7363 (first chance)
    (14b4.13a0): CLR exception - code e0434f4d (first chance)
    (14b4.13a0): CLR exception - code e0434f4d (first chance)
    (14b4.13a0): CLR exception - code e0434f4d (first chance)
    (14b4.13a0): C++ EH exception - code e06d7363 (first chance)
    (14b4.13a0): C++ EH exception - code e06d7363 (first chance)
    (14b4.15c8): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=800703e3 ebx=00000001 ecx=01892710 edx=01892f60 esi=01892fd0 edi=000003e3
    eip=0064006f esp=0198fe9c ebp=0011b1b8 iopl=0         nv up ei ng nz na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010282
    0064006f ??               ???
    0:014> r
    eax=800703e3 ebx=00000001 ecx=01892710 edx=01892f60 esi=01892fd0 edi=000003e3
    eip=0064006f esp=0198fe9c ebp=0011b1b8 iopl=0         nv up ei ng nz na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010282
    0064006f ??               ???
    0:014> k
    ChildEBP RetAddr
    WARNING: Frame IP not in any known module. Following frames may be wrong.
    0198fe98 6a2a2fef 0x64006f
    0198feb0 79f2f3b0 webengine!CorThreadPoolCompletionCallback+0x35
    0198ff14 79f71123 mscorwks!ThreadpoolMgr::CompletionPortThreadStart+0x406
    0198ffb8 77e66063 mscorwks!ThreadpoolMgr::intermediateThreadProc+0x49
    0198ffec 00000000 kernel32!BaseThreadStart+0x34
    0:014> .loadby sosmscorwks
    Syntax error in extension string
    0:014> .loadby sos mscorwks
    0:014> !clrstack
    OS Thread Id: 0x15c8 (14)
    Failed to start stack walk: 80004005
    0:014>

  • Re: Application Pool Terminating Unexpectedly

    01-24-2006, 7:41 PM
    • Star
      14,593 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    Hi Mike,

    Can you send me an email directly (scottgu@microsoft.com)?  I can then help loop you into PSS for them to help with this investigation.  That might be the easiest way for us to figure out what is going on.

    thanks,

    Scott

  • Re: Application Pool Terminating Unexpectedly

    08-18-2007, 8:28 AM
    • Member
      7 point Member
    • gokilarajan
    • Member since 08-04-2005, 3:09 AM
    • india
    • Posts 2

    Hi,

     

    Can anyone update me the final outcome of the above problem as I too face the same situation.

    The unhandled exception in my application causing my CLR to terminate.

    Thanks in advance.

     

    Regards,

    Gokil 

     

Page 1 of 1 (8 items)