Using Jconsole for Memory Leak Using Jconsole for Memory Leak spring spring

Using Jconsole for Memory Leak


I think I've found the answer to my question. The 'Total blocked' and 'Total waited' are simply counts for the number of times the thread waited or was blocked. JConsole is taking this information from ThreadInfo.

Blocked count is the total number of times that the thread blocked to enter or reenter a monitor. I.e. the number of times a thread has been in the java.lang.Thread.State.BLOCKED state.

Waited count is the total number of times that the thread waited for notification. i.e. the number of times that a thread has been in the java.lang.Thread.State.WAITING or java.lang.Thread.State.TIMED_WAITING state.


Name: Finalizer State: WAITING on java.lang.ref.ReferenceQueue$Lock@1b79cfd Total blocked: 4,049 Total waited: 1,579

The ReferenceQueue is maintaining a reference for all unused objects (waiting for finalization), in other words there is 4049 objects waiting for a garbage collection.

When hunting for memory leaks, be sure to do a full GC (or many GC until nothing can't be reclaimed) before doing the dump


The windows task manager shows the virtual memory size and is most of the time not accurate. I have seen this a lot of time, what JConsole shows as the footprint is the right memory footprint.

For more information regarding JConsole check here.