aspose file tools*
The moose likes Tomcat and the fly likes Disable Minidumps in Java 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Disable Minidumps in Java 7" Watch "Disable Minidumps in Java 7" New topic
Author

Disable Minidumps in Java 7

Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

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?


My Blog: Down Home Country Coding with Scott Selikoff
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

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.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

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

Joined: Oct 23, 2005
Posts: 3716
    
    5

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

Joined: Oct 23, 2005
Posts: 3716
    
    5

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

Joined: May 06, 2012
Posts: 4
I am facing the same problem. Do you have any new insights to share.
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Disable Minidumps in Java 7