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
0 answers

How to find java total heap memory consumed by classes in specific package using heapdump

Using heapdump, how to find the total heap memory consumed by all the instances of classes under a specific package. Example, would like to know how much heap memory was consumed by org.apache.log4j.* This should certainly include the String,…
krishna
  • 807
  • 2
  • 11
  • 19
2
votes
1 answer

What would be a normal size of org.hibernate.impl.SessionFactoryImpl objects ?

I am working on a web application with Spring / Hibernate, after fews days of production it became really slow, so I did a heapdump using visualvm but I do not know much about how to analyse results, I do not even know what would be a normal size of…
bmscomp
  • 777
  • 1
  • 11
  • 21
2
votes
2 answers

How to capture Heap Dumps with AppDynamics?

How can we capture heap dumps with the help of appdynamics?
jasleen
  • 235
  • 1
  • 7
  • 19
2
votes
1 answer

Memory-leak : how to resolve

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…
sMajeed
  • 323
  • 4
  • 10
2
votes
1 answer

Get used and free memory from Java heap dump

I have a Java heap dump, and I would like to find out the size of the used heap and how much free memory was available. I'm using the Eclipse memory Analyzer. Is this possible?
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76
2
votes
2 answers

How to completely disable heap dumps for a java process?

I would like to disable them to block anyone from gaining access to passwords stored in memory. What I found so far is -XX:+DisableAttachMechanism This blocks connections via i.e. jconsole but I can force jmap to get a dump like: jmap…
kostas.kougios
  • 945
  • 10
  • 21
2
votes
0 answers

Node.js - Large number of post request to another server causes memory leak

I have a node app that makes large number of request to another server using restify. As the number of requests increases,memory keeps on growing and ultimately the app crashes. Below is the snippet of my code. var restify = require('restify'); var…
Sarita
  • 837
  • 11
  • 19
2
votes
0 answers

Interactive querying of java heap dumps in headless (terminal only) machine

I need to investigate a potential memory leak in a java application. specifically: I have an object type that is contained in a map. this data is reread every now and then, and the map is replaced with the new one. However, it appears that some of…
Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106
2
votes
0 answers

Duplicate fragment allocation when using ViewPager with different layouts

I've observed very strange Android fragment allocation behaviour in my application recenty. My application has two fragments and two layouts: portrait layout with ViewPager as root view; landscape layout without Viewpager (in this example…
2
votes
1 answer

Runtime heap analysis; when is a String initialized that matches a pattern

I have a Java program that at some point eventually creates a string that is matched by "schema.sql". I want to find where in the source code this happens. Searching "schema.sql" on the source code does not yield the location. Instead the program…
David Groomes
  • 2,303
  • 1
  • 21
  • 23
2
votes
1 answer

can java server survive after OutOfMemoryError

Can java server survive after below errors java.lang.OutOfMemoryError: Java heap space java.lang.OutOfMemoryError: GC overhead limit exceeded In my application i got heap dump after this error still I see some logs getting printed after this…
Vipin
  • 4,851
  • 3
  • 35
  • 65
2
votes
1 answer

application server restart on OOM exception

Can we automatically restart a websphere application server v6.1 on OOM exception after heap dump is created?we have an enterprise application hosted on websphere application server,recently we are facing OOM exceptions,and from time to time the app…
2
votes
0 answers

java heap histogram from inside of program

How can I invoke heap-dump from my Java program as similar to what jmap produces with "-histo" option. As far as know heap-dump in binary form (or like output from "-dump" option of jmap) could be handled by using HotSpotDiagnosticMXBean, but not…
2
votes
1 answer

Why would a java heap allocation resizing cause an OOME?

Why would a java heap allocation resizing cause an OOME? We are seeing OutOfMemoryExceptions in our logs, and they seem to coincide with the java heap commit size growing from ~1G to ~2.4G. Despite the error message, it does not appear that we are…
2
votes
2 answers

Java data structure of 500 million (double) values?

I am generating random edges for a complete graph with 32678 Vertices. So, 500 million + values. I am using a HashMap to using the edges as key and the random edge weight as the value. I keep encountering: Exception in thread "main"…
quannabe
  • 367
  • 1
  • 4
  • 11