Logs can provide much more than debugging and troubleshooting for your application. Read more to see how logs can be used for metrics, alerts, experiments, and more.
In this article, we'll see how GC activity can cause major performance problems. This phenomenon is called Memory Pressure and we'll see how to deal with it using memory profilers.
Memory leaks are very common, hard to notice, and eventually, lead to devastating consequences. The main tool to detect and fix memory leaks is a Memory Profiler. In fact, I believe the most common usage of memory profilers in .NET is exactly for the purpose of fixing memory leaks. In this article, you'll see exactly how to use memory profilers to find the leaky objects, why they are still referenced, and how to solve the problem.
Memory leaks and GC Pressure cause pretty inconvenient effects like out-of-memory crashes, performance problems, and high memory consumption. Our primary tools when dealing with those issues are memory profilers. They are one of the most important category of tools in .NET troubleshooting, and in this article, you'll see how to use them and extract the most information from them.
There's an incredible built-in mechanism in Windows called Performance Counters that allows you to follow a whole lot of useful metrics. It's easy to use, comes free, and perhaps not used as much as it deserves. In this article, we'll see how to monitor performance counters with PerfMon, ...
One of the most important concepts in modern programming is Exceptions. They were introduced in the 60's with LISP and eventually made their way to practically all modern programming languages. This article is an extensive guide to dealing with exceptions in Visual Studio.
Memory leaks are sneakily bad creatures. It's easy to ignore them for a very long time, while they slowly destroy the application. With memory leaks, your memory consumption grows, creating GC pressure and performance problems. Finally, the program will just crash on an out-of-memory exception.
Finding, Fixing and learning to Avoid Memory Leaks is an important skill. I'll list 8 best practice techniques used by me and senior .NET developers that advised me for this article.
Event registrations in C# (and .NET in general) are the most common cause of memory leaks. At least from my experience. In fact, I saw so much memory leaks from events that seeing += in code immediately makes me suspicious.