Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Disable Minidumps in Java 7  RSS feed

 
Scott Selikoff
author
Bartender
Posts: 4081
21
Eclipse IDE Flex Google Web Toolkit
  • 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
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • 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
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • 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
Bartender
Posts: 4081
21
Eclipse IDE Flex Google Web Toolkit
  • 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
Bartender
Posts: 4081
21
Eclipse IDE Flex Google Web Toolkit
  • 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
  • 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
Bartender
Posts: 4081
21
Eclipse IDE Flex Google Web Toolkit
  • Likes 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!