Memory leak detection

What is memory leak detection?

Memory leak detection refers to the process of identifying existing or potential memory leaks in a Java application, or finding the code responsible for memory misallocation and unnecessarily high memory usage.

A key part of Java troubleshooting and Java application optimization, memory leak detection can be carried out by manually disabling and enabling sections of your application code and monitoring JVM memory usage using a JMX monitoring or JVM profiling tool. A quicker way of detecting memory leaks, however, would be to use an APM tool to continually collect and analyze the necessary diagnostic data.

JVM performance and memory analysis.

Memory leak detection using heap dumps

Carrying out memory leak detection quickly and effectively is critical to ensuring the performance, availability, and scalability of Java applications. One of the easiest ways to locate and eliminate memory leaks is to use Java heap dumps, or snapshots of main memory.

  • First, you can find out whether a potential memory leak exists or not by collecting and examining JVM metrics such as heap usage. If you find that heap memory usage is constantly increasing, you can use a heap dump for memory leak detection.
  • You can then examine the heap dump to identify problematic Java objects, or objects accumulating on the heap, and -- taking a closer look at heap utilization -- look for the method that is creating the objects.
  • Finally, you can examine the method executions to figure out why the objects are not being removed by garbage collection and share this information with your developers to implement a fix.
All Java process details at a glance.

Tools suitable for memory leak detection

Fast-growing single object memory leaks can be uncovered easily using Java heap analyzers or profilers, which show you how memory is being used by your application. But for slow-growing memory leaks or those caused by overly complex object structures, you may need to leverage a more sophisticated tool that can provide you with granular diagnostic data for memory usage analysis and memory leak detection.

Dynatrace Java monitoring lets you see the top contributors for response time, failure rate and CPU consumption.

Java memory leak detection and diagnostics at your fingertips

Dynatrace is an advanced application monitoring, application troubleshooting (including JavaScript and PHP troubleshooting), and digital experience management platform. What is digital experience? It is the impressions users have when interacting with a digital service or platform. Dynatrace offers you full-stack, fine-grained application monitoring plus UX testing and monitoring capabilities so you can ensure that each and every user of your website, mobile app, or connected device enjoys a satisfying digital experience.

Dynatrace helps you not only detect memory leaks but also analyze memory usage and identify memory anti-patterns in your Java application. Our solution provides you with the analytics capabilities and granular data you need to put an end to memory leaks, optimize garbage collection configuration, and achieve peak performance and a superior digital experience for your users.

Dynatrace can perform two types of heap dumps, or memory snapshots, for memory leak detection: lightweight snapshots, which are useful for analyzing memory consumption trends, and full memory snapshots for deep memory leak analysis.

Try Dynatrace free for 15 days.

Monitor Java memory management and see the impact of Garbage collection on performance.

You may also be interested in…

Lost in the Cloud? The 2018 Global CIO Report

Top challenges facing CIOs in a cloud-native world

Based on a global survey of 800 CIOs, this report takes a closer look at the challenges that organizations face in overcoming the hyper-complexity of modern, cloud-centric ecosystems.

Read the 2018 Global CIO report here

The Global Digital Performance & Transformation Audit

Global Digital Performance & Transformation Audit

In an independent study involving more than 1,200 global IT and business professionals, Dynatrace reveals that it’s commonplace for organizations to encounter customer and revenue-impacting performance problems every five days.

Read the Global Digital Performance & Transformation Audit here

2018 Gartner Magic Quadrant for Application Performance Monitoring Suites

Named a Leader in the Gartner Magic Quadrant for APM Suites 8 years in a row

It's our dedication to innovation and ability to see the market expanding beyond APM and into the modern era of "digital performance management" that earns us a top spot year after year.

Read the latest Gartner Magic Quadrant for APM Suites report here

Start your 15-day free Dynatrace trial today!

Try for free Contact us