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

18,812

Solution 1

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:

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!

Solution 2

Heap dumps might be created for several reasons:

  • Automatic heap dump generation was enabled (it is disabled by default). See Enabling automated heap dump generation on how to disable it
  • You are having regular out of memory errors, which cause diagnostic information such as heap dump collected. In this case you should analyze what consumes memory or just increase JVM heap size - Java virtual machine settings
  • Dump generation is triggered manually which is probably not the case
Share:
18,812
Adi
Author by

Adi

Updated on June 05, 2022

Comments

  • Adi
    Adi almost 2 years

    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.

  • Adi
    Adi over 10 years
    Thanx Marcin.Do i have to restart instance after setting JVM argument -Xdump:none