

Whenever we create a Java object by creating an instance of a class, it is always placed in an area known as the heap. This article is accompanied by a working code example on GitHub. We will next analyze this heap dump to identify the potential objects which could be the cause of the memory leak. To see this in action, we will first trigger an OutOfMemoryError and then capture a heap dump. To investigate memory problems, the JVM Heap Memory is often the first place to look at.

Under each Problem Suspect you should find some keywords, that you can search for on SMP, SCN or if the suspect is a custom code or a third party application you can get in contact with the respective responsible to get to the root cause.As Java developers, we are familiar with our applications throwing OutOfMemoryErrors or our server monitoring tools throwing alerts and complaining about high JVM memory utilization. The most used option is Leak Suspects Report, this analysis your dump, searches for the memory leak and lists what are the applications/libraries that are causing the problem, split in percentages. The value has to be set to at least the size of the dump file: In order to solve this you have to change -Xmx parameter to a higher value from the tool file MemoryAnalyzer.ini located in the mat directory. It is possible that for larger dumps, you get this error when opening the file for analysis:

Now, before opening the dump file you have to make sure that you have enough RAM memory available on the machine that you run the heap dump analysis, that is more than the size of the dump. Install the extension downloaded earlier as follows:Īnd the installation is completed, only a restart of the computer is necessary. Unzip 86.zip to your computer and run the MemoryAnalyzer.exe from the mat directory:Ĥ. MemoryAnalyzer-extensions-update-site.zipģ. Download the extension pack from the note 1883568 – How to self analyze a Heap Dump using MAT If you have a windows environment you have to download the Windows (x86) kit to your local computer => 86.zipĢ. These are the steps for the installation: There are several sources from SAP that I will list at the end of the article, but unfortunately this information if a little bit outdated, that is why I would like to clarify here what are the steps that need to be followed in order to install this tool and how can the dump can be analyzed with it. Memory Analyzer is a tool developed in Eclipse that is used to find the cause for the Heap Dump generation in the SAP Java systems.
