I trying to diagnose a memory leak while running my integration tests in my Spring Boot App. When I am running : I keep getting OOM errors: But no heap dump in the specified directory. I have also tried adding the following to my gradle.properties: No change. What am I doing wrong ? How can I collect the heap dumps
Tag: heap-dump
Create JVM heapdump when K8s healthcheck restarts the pod – no OOM occur
I have a situation when all of a sudden a really long GC pause occurs and I need to find out what is the source of the sudden memory allocation. The long GC pause (around 30 seconds) causes the pod to fail several K8s health checks in a row and the pod gets restarted, without OOM actually happening. I want
why there is difference in Heap dump size generated by jmap and jcmd?
I am trying to take heap dump using below 2 commands jcmd $pid GC.heap_dump /tmp/filename.dump jmap -dump:format=b,file=/tmp/filename.dump $pid jcmd produces file size of ~300M and jmap produces file size of ~1.4G. why these are different sizes, do we have any additional information in jmap ? am I missing some arguments in jcmd ? JDK is 1.8.0_162 Xms and Xmx is
How to extract a HashMap from a Java heap dump
I have a Java heap dump generated using jmap. This contains a HashMap which I need to extract into a text format (CSV would be fine). The HashMap is fairly large so I need a scripted solution. Using JVisualVM I can find the HashMap. However, there doesn’t seem to be a way to export its data. After some experimentation I
Calculate Xmx setting and actual heap size from Java dump
I’ve got a heap dump file (java_dump.hprof) written by a Java 7 JVM. Is it somehow possible to calculate the Xmx command line option as well as the actual heap size from this dump? Answer The dump is based on the size actually used but in a different format so it could be bigger. If the dump was triggered on
High memory usage when using Hibernate
I code a server side application with java run on linux server. I use hibernate to open session to database, use native sql to query it and always close this session by try, catch, finally. My server query DB using hibernate with very high frequency. I already define MaxHeapSize for it is 3000M but it usually use 2.7GB on RAM,