After reading a lot about MAT, I used my production heap dump to analyze the memory leak issue. Here is the leak report error:
The thread org.apache.tomcat.util.threads.TaskThread @ 0x6d8be0a30 http-bio-8443-exec-115 keeps local variables with total size 3,695,816,440 (89.03%) bytes.
The memory is accumulated in one instance of "java.lang.Object[]" loaded by "'<'system class loader'>".
The dominator tree summary shows the following:
org.apache.tomcat.util.threads.TaskThread @ 0x6d8be0a30 http-bio-8443-exec-115 SH:112 RH:3,695,816,440 Prct:89.03% java.util.ArrayList @ 0x6da437cd8 SH:24 RH:3,695,668,184 Prct:89.03% java.lang.Object[1823230] @ 0x77da34ee8 SH:7,292,936 RH:3,695,668,160 Prct:89.03% com.cjs.persistence.dto.SomeDTO @ 0x76f631650 SH:360 RH:2,264 Prct:0.00% com.cjs.persistence.dto.SomeDTO @ 0x750ed8f88 SH:360 RH:2,264 Prct:0.00% ...
The path to GC root shows the thread itself. Am unable to find what is causing this and why these lists of DTOs is retained and how to clear them up. Any advise is much appreciated.