1
votes

We are running a web application using ASP CORE. Unfortunately while inspecting Event Viewer Manager I noticed weird crashes and restarts of the app.

Error log looks like this:

Faulting application name: dotnet.exe, version: 1.1.0.1179, time stamp: 0x58224b03
Faulting module name: KERNELBASE.dll, version: 10.0.14393.1770, time stamp: 0x59bf2ba6
Exception code: 0xe0434352
Fault offset: 0x0000000000033c58
Faulting process id: 0x3ec4
Faulting application start time: 0x01d3885e41a55d69
Faulting application path: C:\Program Files\dotnet\dotnet.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 20b0cbe4-423e-4adf-ba0f-848a38ea967b
Faulting package full name:
Faulting package-relative application ID:

What I investigated was memory leaks of dotnet.exe process. But it doesn't seem to be the issue since private bytes parameter doesn't rise. Here I attach the graph of 20 minutes of app runtime. Crashes and restarts are constant and occur every 2 minutes.

enter image description here

Have you got any ideas how can I investigate my issue?

2
Do you have logging enabled and set to either a file, the event viewer or a database?Camilo Terevinto
In IIS Manager there is logging set for the website but it only stores information about incoming requests and it is stored in a file. The error description that I provided comes from Event Viewer.Maciejek
Enable trace logging in IIS.Chris Pratt
It is enabled but it's empty. The problem is that the application crashes even when there are no requests.Maciejek

2 Answers

0
votes

Ok, I found what was causing the problem. Digging into stdout logs of application I noticed:

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\...\wwwroot\...\...\XYZ-v.json' is denied.
at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at XYZ.Utils.Dashboard.DashboardController.SaveToFile()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()

The solution was to add full permissions for IIS user to this file.

Silly me :)

0
votes

Possibly, You can try enable 32 bit application on Application pool