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
3
votes
3 answers

How to analyze the heap dump using jhat

I ran the jhat on the heap dump, it has generated the reports. How do i use the report to analyze the heap.I couldn't understand completely other than the instance count. Is there any references or case studies on that. In short, i need to proceed…
John
  • 2,682
  • 5
  • 23
  • 24
3
votes
1 answer

Profiling heapdumps in Chrome Developer Tools (memory leak)

I'm having bit trouble with a NodeJS/Express/React application that is on production as we speak. The problem is, that it keeps climbing up on memory usage and it just doesn't stop. It is slow and steady, and eventually Node crashes. I have several…
3
votes
1 answer

Difference between System.gc() and dead object reclamation performed by taking a live-only heap dump?

There are at least two ways, directly or indirectly, of suggesting that the JVM expend effort collecting garbage: System.gc() taking a heap dump and requesting live objects only In the latter, I can get hold a heap dump programmatically, for…
Joe Kearney
  • 7,397
  • 6
  • 34
  • 45
3
votes
0 answers

java - jmap crashes with "can not get class data for heapdump in java 8

jmap -F -dump:file=heap.dump 13976 following are the error logs Attaching to process ID 13976, please wait... Debugger attached successfully. Server compiler detected. JVM version is 25.25-b02 Dumping heap to heap.dump ... Exception in thread…
3
votes
6 answers

Have PHP dump heap on OutOfMemory exception

I am currently debugging a script that constantly runs into OutOfMemory exceptions. It is run as a cronjob and usually runs fine, but when the cronjob wasn't run for a while (for whatever reason) the script has to handle to many elements that queued…
Daniel Baulig
  • 10,739
  • 6
  • 44
  • 43
3
votes
1 answer

Heap size discrepancies in VisualVM vs Eclipse MAT

I'm trying to analyze the memory usage of my Java app. In VisualVM I see the Heap size as ~733M: But when I exported the heap dump to Eclipse MAT, it shows as 36.6MB: Why is that?
Glide
  • 20,235
  • 26
  • 86
  • 135
3
votes
0 answers

Jasper JRVerticalFiller consumes almost all my memory

I noticed that my application is slow.I've decided to analyze GC logs and heap dump. All of a sudden I got this: Some JRVerticalFiller took 3.4Gb of 4Gb heap memory. It starts from TaskThread which holds JRVerticalFiller, that one holds…
idmitriev
  • 4,619
  • 4
  • 28
  • 44
3
votes
1 answer

In a visualvm heap dump, what is the number after "Local Variable" for threads?

I am analyzing the threads in the heap dump using the VisualVM and am wondering whats the count after the Local Variable: byte[] in the below thread means? does it mean the size of the variable? or the total number of instances of the variable? or…
OTUser
  • 3,788
  • 19
  • 69
  • 127
3
votes
0 answers

Heap Dump shows many instances of java.lang.Thread

I'm analyzing java application deployed in Jboss 5.1 container in RHEL 6. Ηeap dump of my application, when analyzed through Eclipse Mat, suggests that about 83% of the heap memory is occupied by java.land.Thread instance. Can you please help me…
VinayBS
  • 389
  • 5
  • 19
3
votes
2 answers

How do I inspect specifically what Java strings are being kept around, causing memory leak?

I can see in the heapdump file that the String class exhausted memory, but how do I know specifically what those strings are?
One Two Three
  • 22,327
  • 24
  • 73
  • 114
3
votes
2 answers

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…
paj28
  • 2,210
  • 3
  • 25
  • 37
3
votes
2 answers

get heap dump from command line using jmx

Is it possible to get a server heap dump on a running process on linux (CentOS) using JMX from command line ? can't open VisualVM, can't install jmap
Nati
  • 1,034
  • 5
  • 19
  • 46
3
votes
1 answer

opening ibm .phd files using visualVM

Can some one please tell me how to open the .phd(IBM Portable heap dump) files in VisualVM ? I have tried with Heap Analyser to open it but I could not locate exactly which object is causing the issue ?
Venkat
  • 37
  • 6
3
votes
1 answer

Heapdump error when running iron-node

I get this error when launching iron-node buster-test run failed: Error: -c/--config: Error loading configuration /Users/r01010010/Projects/Mad/paysite/test/buster.js Cannot find module '../build/Debug/addon' at Function.Module._resolveFilename…
R01010010
  • 5,670
  • 11
  • 47
  • 77
3
votes
1 answer

Jmap for play framework on heroku

I'd like to take heap dumps of a play framework (v2.4.x) deployed on heroku. I read this heroku guide which instructs to prefix the java command with with_jmap. However play has its own start script that executes java and the with_jmap option is…
LiorH
  • 18,524
  • 17
  • 70
  • 98