question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

High CPU usage and severe memory leak after upgrading to ElmahCore 2

See original GitHub issue

I’ve been using Elmah v 1.2 for a long time with no issues. Last weekend I moved my aspnet core website to .Net 5.0 and ElmahCore 2.0.6. Right after that I noticed a very high CPU usage and a memory leak that would eat all memory in a couple of minutes.

Analyzing a memory dump I’ve found suspect entries:

00007ff922cd08c8 80722 2583104 System.Collections.Generic.List1[[ElmahCore.ErrorLogEntry, ElmahCore]] 00007ff9207510f0 161498 5167936 System.Decimal 00007ff92143b7a0 80838 5820336 System.Threading.Tasks.Task1[[System.Int32, System.Private.CoreLib]] 00007ff9207cd778 16571 7660652 System.Byte[] 00007ff922cd0838 261169 10446760 ElmahCore.ErrorLogEntry 00007ff922cd1410 161445 11166704 ElmahCore.ErrorLogEntry[] 00007ff920752990 15266 12954908 System.Int32[] 00007ff920757a90 387225 19358942 System.String 00007ff920881058 524027 37729944 System.Collections.Hashtable 00007ff9212e73b0 522339 41787120 System.Collections.Specialized.NameValueCollection 00007ff92187b230 261170 41787200 ElmahCore.Error 00007ff920775998 2183474 70004992 System.String[] 00007ff9242b8868 7051567 225650144 System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry 00007ff921305470 7573908 242365056 System.Collections.ArrayList 00007ff9208813f0 766184 321624144 System.Collections.Hashtable+bucket[] 00007ff920696860 7872966 346213040 System.Object[]

My guess is that an error inside Elmah 2 is being handled by the Elmah 2 routines, generating the same error again and again. Unfortunately I couldn’t come up with a simple way to reproduce it because I had to immediately rollback the upgrade.

After downgradind to Elmah 1.2 everything went back to normal.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
User00015commented, Jun 10, 2021

Running into the same issue here. Just upgraded ElmahCore to 2.0.6 on VS2019 running .Net5. Saw the IIS Express Worker Process spike to over 10Gb (!!) before I killed it. I wasn’t seeing this issue before upgrading.

0reactions
davidglassborowcommented, Aug 31, 2021

Thanks for the new release @ElmahCore, we appreciate it 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

High CPU usage & Memory leak
Hello, I've a leak memory and high CPU from lanmanServer and System (ntoskrnl.exe). The system (ntoskrnl.exe) is on 19%-20% CPU usage all ...
Read more >
High cpu usage and memory leak - java
This code works more or less what i've expected it should do, but it's turned out it has high cpu usage (after some...
Read more >
High cpu load and memory leak after update - Installation
anyone else have a high cpu load and memory leak that leads to an entire system crash after updating above 0.97.2? I have...
Read more >
Radeon Software memory leak + more bugs, see post below
r/Amd - Radeon Software memory leak + more bugs, see post below. This thread is archived ... Edit 2: rip never mind, RAM...
Read more >
Troubleshoot Memory Problems
This document describes symptoms and possible causes of memory allocation failure (MALLOCFAIL) and details on how to fix these problems.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found