'Really long garbage collection with massive logical thread count

I have an ASP.Net 4.x web application that occasionally goes into a really long garbage collection. It takes about 40 minutes. During this time the logical thread count spikes from around 65 logical threads to 4,900,000,000 logical threads. (Physical thread count goes down a bit during this spike.)

I am stumped on what could cause this. Or, more importantly, how I can go about figuring it out.

I had my admins get a memory dump during the garbage collection using the NotMyFault tool, but dotMemory can't open it (because it was taken in the middle of the garbage collection). I tried to look at it using Windbg, but that tool is beyond my skill and I can't seem to get it to give me any real information.

There does not seem to be any indication that it is going to happen, so I can't get a memory dump before it starts.

What could cause 40 min long garbage collections with crazy high logical thread counts?

Or

How can I get more information to diagnose this myself?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source