Identify & Fix JVM memory leaks with Java Flight Recorder and JDK Mission Control

preview_player
Показать описание
Got a Java memory leak? Don't waste your time with a JVM heap dump. Instead, kick off Java Flight Recorder and take advantage of the new JFR Old Object Sample event. With a Flight Recording in hand, Java's JDK Mission Control will be able to identify memory leaks, long running references stuck on the heap and objects that are consuming far too much RAM. If you want to fix Java memory leaks without going through a massive JVM heap dump, watch this Java Mission Control tutorial and save yourself time and aggravation.

Some further information on Java memory leaks and JDK Mission Control here:
Рекомендации по теме
Комментарии
Автор

Even then it´s still extremely difficult to figure out what is the line in the code that´s producing the leak. I may have dozens or even hundreds of hashmaps in my application, it´s insane to start looking at every single hashmap usage.

Flw
Автор

thanks for excellent tutoruial, I'm here looking for how to enable live object settings looking for "make sure that the option Object Types + Allocation Stack Traces + Path to GC Root is selected from the Memory Leak Detection setting." can you tell me how to do it?

vigneshsr
Автор

How would you go about investigating an issue with a high CPU load, rather than an issue with memory leaks?? It occurs every few months and results in us having to restart the server. The CPU peaks to 100% but the memory usage is fine.

jesper
Автор

Hi Cameron,
Thanks for interesting lecture. If I understood you correctly in order to find memory leak suspects I need to run JFR on my application with JFC file which includes below event. Is it enough or other events will be also needed? I want to get only necessary events to minimize overhead.

<event name="jdk.OldObjectSample">
<setting name="enabled"
<setting name="stackTrace"
<setting name="cutoff" ns</setting>
</event>

benziong