Questions tagged [heap-dump]

A heap dump is a snapshot of the memory of a Java process.

A heap dump is a snapshot of the memory of a Java process.

The snapshot contains information about the Java objects and classes in the heap at the moment the snapshot is triggered. Because there are different formats for persisting this data, there might be some differences in the information provided. Typically, a full garbage collection is triggered before the heap dump is written, so the dump contains information about the remaining objects in the heap.

All Objects: Class, fields, primitive values, and references.

All Classes: Class loader, name, super class, and static fields.

Garbage collection roots: Objects defined to be reachable by the JVM.

Thread Stacks and Local Variables: Call-stacks of threads at the moment of the snapshot, and information about local objects on a frame by frame basis.

A heap dump does not contain allocation information, therefore you cannot work out what created the objects or where the objects were created.

Source

485 questions
2
votes
4 answers

Taking a heap dump on already crashed system

My tomcat application crashed due to memory leak. I want to take the heap dump on the crashed system/jvm. Is it possible? I am using windows/tomcat 6 How?
java_enthu
  • 2,279
  • 7
  • 44
  • 74
2
votes
1 answer

Parsing heap dump file

I have an application where I obviously create too many objects, i get this message: java.lang.OutOfMemoryError: Java heap space Dumping heap to java_pid2468.hprof ... Heap dump file created [1087703293 bytes in 18.711 secs] Exception in…
sekulicd
  • 31
  • 1
  • 4
2
votes
1 answer

Getting main() method parameters from a heap dump

I have a Java binary heap dump file. Is there a generic way to find out the command line parameters that were passed in to the program's main() method? I tend to use Eclipse MAT for working with heap dumps.
Rich
  • 15,602
  • 15
  • 79
  • 126
2
votes
1 answer

Memory leak due to org.hibernate.internal.SessionFactoryImpl hard to trace

I have this Spring boot microservice that I suspect has a memory issue but I am unable to trace the suspected class back to the service code. Here are some indicating pictures, Seems like a persistence layer issue but we're not using the…
2
votes
2 answers

Analysing java heapdumps: why are enum instances kept in heap?

I've been looking for memory leaks in my app and foud with jhat that for some reason instances of enumerations are kept in the heap. To simulate it, I have deployed my app in tomcat, worked a bit with it, stopped it and performed GC on tomcat…
Steven De Groote
  • 2,187
  • 5
  • 32
  • 52
2
votes
2 answers

Android Studio Profiler shows 100 MB of memory usage for empty activity

I'm using Android Studio Profiler to check and optimize memory consumption. to do some tests, I have disabled every section in the app except for the main activity. so when the app launches, there is only a blank activity which does not do anything…
2
votes
0 answers

Why does Kafka have a lot of Sensor objects in Old gen heap?

I have a Kafka broker (2.7.1) running on Java 11. I noticed that the broker is slow because of the G1 old generation collections. Taking a heap dump reveled that about 30% of heap is used by a ConcurrentHashMap$Node which retains 1000s of…
Thomas
  • 4,119
  • 2
  • 33
  • 49
2
votes
1 answer

OutOfMemory instances in Heap Histogram

I have been doing stress testing for my application. In my analysis, I did found some OutOfMemory instances in heap histogram. 726: 10 320 java.lang.OutOfMemoryError I didn't observe OutOfMemory issue in my application logs,…
user2757415
  • 153
  • 1
  • 15
2
votes
2 answers

jps not listing tomcat process and jmap fails to create heap dump

I have running tomcat (9.0.39.0) server, started by user cpappt and running with pid: 1682650. The machine on which this server runs is not bare metal but a VMware machine and the JVM is from OpenJ9 > ps -ef | grep Bootstrap cpappt 1682650 1…
morecore
  • 900
  • 3
  • 14
  • 32
2
votes
1 answer

Android Studio heap dump is empty

Android Studio 4.0.2 is exporting empty hprof files from memory that is not empty. The profiler shows memory correctly, but I would like to use MAT to analyze the heap because Android Studio does not give the information in an easy to parse way.…
John Glen
  • 771
  • 7
  • 24
2
votes
0 answers

K8 container orchestration: JVM not releasing memory

We have java based microservices. When these microservices are not serving any requests, each pod of the microservice is using about 270MB. We have kept the memory limit as 512Mi for each microservice. I did some load testing on some of these…
Chetan Yewale
  • 192
  • 4
  • 16
2
votes
1 answer

How fix memory leak on ktor kotlin web framework

Hi I'm running ktor web server on kubernetes. When server instance start it use 250-300 MB but after running several hours memory usage increase to 600MB and i have set limit to 600MB after that server restarted because OOM. For testing when memory…
William
  • 225
  • 4
  • 21
2
votes
1 answer

JProfiller HeapWalker: This view is not available when retained size calculation has been disabled jprofiler

I am a newbie to JProfiler. I am trying to figure out retained and deep size of an object in java. However, I'm getting n/a for all objects in Heap Walker. Also when I'm trying to check Biggest Object, following message has been shown. "This view…
2
votes
3 answers

Huge heap dump (11GB) - Jhat failed & Eclipse MAT needed help

We got a memory error in our EA and we used -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/some/dir to dump the heap at the time of OOM. We had a heap memory of 12GB and perm gen of 256MB. The heap dump is generated in the Linux box where…
raksja
  • 3,969
  • 5
  • 38
  • 44
2
votes
2 answers

Memory Analyzer Tool: ParseHeapDump.sh - Application Error: OutOfMemory Requested length of new long[2,147,483,640] exceeds limit of 2,147,483,639

I am trying to analyze a 200GB heapdump on a remote machine. The heap dump was created by through visualVMs "Create Heap Dump" button. Even executing it with Xmx300GB ("$(dirname -- "$0")"/MemoryAnalyzer -consolelog -application…
awildturtok
  • 173
  • 1
  • 13