Disable memory dumps of JVM used by Tomcat as Windows service
Today the Murphy's law hit us... Scenario:
- A 'java.lang.OutOfMemoryError: Java heap space' occurs
- A memory dump is created into '\JazzTeamServer\server\tomcat\bin'
- The disk for JazzTeamServer becomes full
- A 'java.io.IOException: There is not enough space on the disk.' occurs
- The server license is revoked due to 'CRJAZ0942I The license key located at "bundleentry://37.fwk2091220133/jazz_team_server_enterprise_release.jar" could not be processed.'
So, we would be able to disable the creation of heapdumps to prevent these 3-5 failures...
We cannot find any Java option on the tomcat7.exe launch as a Windows service which requests the memory dump (e.g., the JVM option '-XX:-HeapDumpOnOutOfMemoryError').
Any advice?
Thanks in advance.
Accepted answer
Note: -XX:-HeapDumpOnOutOfMemoryError
etc. options apply to the Oracle JVM. The CLM products typically use a copy of IBM's JVM which is installed in the JAZZ_HOME path.
See this document https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.base.doc/ae/ctrb_java626.html for a discussion on managing Java dumps with the IBM JVM.
You can find a complete set of options by using the java -Xdump:help switch (make sure to use the same Java JVM as your RTC server is using (i.e. the java installed in your <JAZZ_HOME> directory tree)).
You should consider using -Xdump:directory=<path> to set the default directory path for dump files to be written to so they go to a file system that has more free space instead of disabling the dumps.
For instructions on adding JVM switches to the Apache Tomcat service controller you will need to refer to the Apache documentation.
See this document https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.base.doc/ae/ctrb_java626.html for a discussion on managing Java dumps with the IBM JVM.
You can find a complete set of options by using the java -Xdump:help switch (make sure to use the same Java JVM as your RTC server is using (i.e. the java installed in your <JAZZ_HOME> directory tree)).
You should consider using -Xdump:directory=<path> to set the default directory path for dump files to be written to so they go to a file system that has more free space instead of disabling the dumps.
For instructions on adding JVM switches to the Apache Tomcat service controller you will need to refer to the Apache documentation.