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: 184.108.40.2069, 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.
Have you got any ideas how can I investigate my issue?
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 :)
User contributions licensed under CC BY-SA 3.0