Welcome to Bits and a Pint! A blog about software development to be enjoyed over a pint of your favorite brew.
Showing posts with label memory. Show all posts
Showing posts with label memory. Show all posts
Thursday, December 10, 2015
C# and the virtual memory "(3rd) party" OOM
In my new role I've been working on projects that are coded with C# and I was recently asked to look into an out of memory issue. Being new to C# and not as attuned to the way in which it handles memory I turned to Google and Stackoverflow for some research. I found out that C# in many ways is similar to Java in how it handles memory management, however, among the differences there is one big one - the unmanaged memory partition. The memory isn't truly "unmanaged", it's just not directly managed by the running application and is typically stored in our virtual page space. A scenario where this comes into play is the utilization of 3rd party COM objects within your program - it is here where our OOM issue begins to take shape.
Friday, August 9, 2013
Permgen crashes due to class loader leaks
Sometime back a colleague was running a performance test and the site was crashing due to an OOM situation. However, they, not being performance focused, were having a tough time isolating the srouce of the crash. So I volunteered to help and found that when the site was running it was overloading the permgen space causing the crash. The permgen is where loaded classes are kept and sure enough if you watched the class graph in JConsole or VisualVM you would confirm that as the site ran the classes loaded were growing too fast for the permgen space to keep up with (in terms of collection) and that there was little to no unloading. After investigating we found 2 different sites with similar issues in different area's and had to use 2 different methods to track down the root cause. Here we've documented the processes uses.
Subscribe to:
Posts (Atom)