简体   繁体   中英

ASP.NET Core 5, IIS Application Pool randomly crashes and stops responce

when my users have more than 20 I give some error at ASP.NET Core 5.0 running on IIS 7.5 on Windows Server 2008 R2. Since refreshing the app randomly crashes and leaves it with a 503 Service Unavailable response.

Example of warning:

   dumpproc version 1.249.198.20220919-114646, installer version 1.249.198.20220919-114646

time: 2022-10-05 20:32:40 UTC, processId: 69908, path: C:\Program Files\dotnet\dotnet.exe
Exception 0xc00000fd: A new guard page for the stack cannot be created.

Another example of a warning:

dumpproc version 1.249.198.20220919-114646, installer version 1.249.198.20220919-114646

time: 2022-10-05 20:32:40 UTC, processId: 69908, path: C:\Program Files\dotnet\dotnet.exe

Number of threads: 114
ThreadId 0xE628 - Stack: [0xDB36400000 - 0xDB36580000] Total Size: 1536 kB (committed: 1532kB) +++STACK OVERFLOW+++
    [0xDB36400000 - 0xDB36401000]    Size: 0x1000                Type: MEM_PRIVATE         State: MEM_RESERVE         Protect: (0x0)
    [0xDB36401000 - 0xDB36580000]    Size: 0x17F000              Type: MEM_PRIVATE         State: MEM_COMMIT          Protect: PAGE_READWRITE(0x4)

I give a crash/error like this from the debugger.

Analysis Summary
 Warning
Description Recommendation
50 client connection(s) in w3wp.exe__mygame.com(domain)(4.0)(pool)__PID__10776__Date__10_06_2022__Time_07_28_18PM__382__Manual Dump.dmp have been executing a request for more than 90 seconds. Please see the Client Connections section of this report for more detailed information about the connection(s).
 Notification
Description Recommendation
One or more of the selected rules were not completed.   See the Analysis Rule Summary for more information.
DebugDiag did not detect LeakTrack.dll loaded in w3wp.exe__mygame.com(domain)(4.0)(pool)__PID__10776__Date__10_06_2022__Time_07_28_18PM__382__Manual Dump.dmp, so no leak analysis was performed on this file.  If you are troubleshooting a memory leak, please ensure LeakTrack.dll is injected into the target process using the DebugDiag tool before or generating new dumps.

For information regarding installation and usage of the IISDiag tool, please see the included help file.    
Analysis results may be incomplete because an error occurred while initializing the CLR diagnostic runtime for w3wp.exe__mygame.com(domain)(4.0)(pool)__PID__10776__Date__10_06_2022__Time_07_28_18PM__382__Manual Dump.dmp.


Dump File:  w3wp.exe__mygame.com(domain)(4.0)(pool)__PID__10776__Date__10_06_2022__Time_07_28_18PM__382__Manual Dump.dmp

Type:  Microsoft.Diagnostics.Runtime.ClrDiagnosticsException

Message:  This runtime is not initialized and contains no data.

Stack Trace:
Microsoft.Diagnostics.Runtime.RuntimeBase..ctor(DataTargetImpl dataTarget, DacLibrary lib)
Microsoft.Diagnostics.Runtime.Desktop.V45Runtime..ctor(DataTargetImpl dt, DacLibrary lib)
Microsoft.Diagnostics.Runtime.DataTargetImpl.CreateRuntime(String dacFilename)
DebugDiag.DotNet.NetDbgObj.CreateRuntime(String symbolPath, DataTarget target, Int32 runtimeIndex, ClrInfo& clrInfo)
DebugDiag.DotNet.NetDbgObj.CreateRuntimeAndGetHeap(String dumpPath, IDbgObj4 legacyDebugger, String symbolPath, Boolean throwOnBitnessMismatch, Boolean loadClrHeap)

HResult: RuntimeUninitialized   This message means that the CLR Runtime is loaded but the ThreadStore or GC Heap information is not initialized.
Analysis Details

and:

**MemoryAnalysis**
Report for w3wp.exe__teslagame.ir(domain)(4.0)(pool)__PID__10776__Date__10_06_2022__Time_07_28_18PM__382__Manual Dump.dmp
Type of Analysis Performed  Memory Pressure Analysis
Machine Name    SERVER
Operating System    Windows Server - 17763
Number Of Processors    32
Process ID  10776
Process Image   c:\Windows\System32\inetsrv\w3wp.exe
Command Line    c:\windows\system32\inetsrv\w3wp.exe -ap "teslagame.ir(domain)(4.0)(pool)" -v "v4.0" -l "webengine4.dll" -a \\.\pipe\iisipm600e3b22-7687-4999-be3c-7bb5e8a2a29d -h "C:\inetpub\temp\apppools\teslagame.ir(domain)(4.0)(pool)\teslagame.ir(domain)(4.0)(pool).config" -w "" -m 0 -t 5 -ta 1
System Up-Time  17:59:36
Process Up-Time 17:59:17
Processor Type  X64
Process Bitness 64-Bit
Virtual Memory Analysis
Virtual Memory Summary
Size of largest free VM block     124.3 TBytes
Free memory fragmentation     1.35%
Free Memory   126 TBytes   (98.43% of Total Memory)
Reserved Memory   2 TBytes   (1.57% of Total Memory)
Committed Memory      238.64 MBytes   (0% of Total Memory)
Total Memory      128 TBytes
Largest free block at     0x000001a8`1a690000

I could really use some help trying to find the source of these crashes.

Just upgrade your project framework, I had the same problem, and upgrade .net5 to .net6 then all problem sloved:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM