File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable Minidumps in Java 7

 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
15
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently upgraded from Java 6 to Java 7, for a Tomcat 7 server (everything 32-bit). Due to some underlying Windows 2008 driver issues, we sometimes get fatal Java errors. They were harmless when we were running Java 6 because the Tomcat process just restarted.

Following the upgrade to Java 7, though, Java now flushes 500 megabytes of memory to disk every time there is a crash/restart. This easily fills up the harddrive over time. Does anyone know how to disable these mini dumps in Java 7?

For reference, both before and after the error I would see log files such as "C:\Program Files\Apache Software Foundation\Tomcat 7.0\hs_err_pid1234.log", but the difference is the new ones contain the line:



Whereas this line was not present when running Java 6, nor was the giant mdmp file. Any suggestions?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Java options are being passed while starting the server? I haven't checked the Oracle Java 7 release, but I think in Java 6 it was the other way around - you had to explicitly pass a param to enable this kind of logging/dump.

 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to this http://docs.oracle.com/cd/E15289_01/doc.40/e15059/dumpfile.htm#BABHCFGA the command line options to add are:

-XX:-DumpOnCrash -XX:-CoreOnCrash


That document talks about JRockit, but I think it might apply to Oracle JRE too since they incorporated some of the JRockit work into Hotspot.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
15
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the tips but no luck. Crash on startup:



And separately:



The only change we made was switching from Java 6 to Java 7, but no one knows how to turn it off. This guy had the same problem but doesn't really offer any useful advice.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
15
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still no solution... I tried adding the options:



But regardless, the memory file was still written and to the local folder at that (C:\Program Files\Apache...), ignoring both of the options.
 
samkum Sameer
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing the same problem. Do you have any new insights to share.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
15
Eclipse IDE Flex Google Web Toolkit
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the only working "solution" I found was to set the directory where Java was trying to write the dump to read only so the file could not be written.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic