Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop creating Heap files ,java core files which are creating in JVM instance.?

In One of the instance of our server,heapdump, javacore ,Snap files are getting created. How to stop creating these files.Please assist me on this.because heap files makes our application slow and have to delete it and recycle instances.

like image 700
Adi Avatar asked Oct 03 '13 06:10

Adi


1 Answers

Your application is slow probably due to some memory issues. Disabling of these dumps, although easy (just add -Xdump:none JVM argument), won't solve the root cause of problem.

You should rather open one of these javacore files and check for this line, which will tell you why dumps are being triggered:

1TISIGINFO     Dump Event

You'll most probably see this cause there:

Detail "java/lang/OutOfMemoryError" "Java heap space" received

If this is the case, then open one of heapdumps with either of these two:

  • Eclipse MAT (http://www.eclipse.org/mat) with DTFJ plugins installed (http://www.ibm.com/developerworks/java/jdk/tools/dtfj.html)
  • Memory Analyzer bundled with Support Assistant and see why the JVM dumps.

Analyzing heap dumps is not trivial, but you can simply request "Leak Suspects" report with finds leaks in most of cases.

If you're familiar with the code running in that JVM or have access to developers, you may also process the core dump (provided that it wasn't truncated, check this: http://www-01.ibm.com/support/docview.wss?uid=swg21584396) and open the resulting zip file with Memory Analyzer. That should give you even more insight of what's really happening.

Disabling dumps will only hide the problem!

like image 113
Marcin Płonka Avatar answered Sep 19 '22 15:09

Marcin Płonka