Hitachi

uCosminexus Application Server Definition Reference Guide


-XX:[+|-]HitachiOutOfMemoryHandling (OutOfMemory handling option)

Organization of this page

Format

-XX:+HitachiOutOfMemoryHandling

This option enables the OutOfMemory handling functionality.

-XX:-HitachiOutOfMemoryHandling

This option disables the OutOfMemory handling functionality.

Description

Specify whether to enable the OutOfMemory handling functionality. This option is valid only when the J2EE server is executed in J2EE server mode.

Use the OutOfMemory handling functionality in combination with the forced termination functionality for OutOfMemory (-XX:+HitachiOutOfMemoryAbort). If the forced termination functionality for OutOfMemory (-XX:-HitachiOutOfMemoryAbort) is disabled, the OutOfMemory handling functionality will be disabled.

If the OutOfMemory handling functionality is enabled, the OutOfMemoryError throwing condition is determined when OutOfMemory occurs. Specifically, the functionality determines whether to continue J2EE server execution if an OutOfMemory error occurs due to shortage of the Java heap, metaspace area, or compressed class space during one of the following types of processing:

After determining, if the J2EE server continues execution, the java.lang.OutOfMemoryError is thrown and only the request processing where OutOfMemory occurred is cancelled.

JavaVM performs the following operations based on the determined results. However, if java.lang.OutOfMemoryError is caught by a Web application, that processing is followed.

The OutOfMemoryError throwing condition is as follows. Note that when JavaVM does not conform to the OutOfMemoryError throwing conditions, JavaVM is terminated forcibly by the forced termination functionality for OutOfMemory.

OutOfMemoryError throwing conditions

When OutOfMemory occurs and if all the following conditions are applicable, JavaVM is said to satisfy the OutOfMemoryError throwing conditions and throws java.lang.OutOfMemoryError without terminating abnormally.

  • The cause of the OutOfMemory error is shortage of the Java heap, metaspace area, or compressed class space.

  • The OutOfMemory error occurred in the request processing during the execution of the Web applications (Servlets or JSPs) on the Web container, processing during the execution of the Enterprise Bean invoked from an EJB client application, processing during the execution of the Message-driven Bean, or processing during the execution of the Enterprise Bean invoked from Timer Service.

  • The throw OutOfMemoryError exclusion condition is not applicable.

Throw OutOfMemoryError exclusion condition

The total number of the current OutOfMemory error and other OutOfMemory errors that occurred in the past hour due to shortage of the Java heap, metaspace area, or compressed class space exceeds the value specified for the -XX:HitachiOutOfMemoryHandlingMaxThrowCount option.

The following table describes the operations for the cause of OutOfMemory occurrence for the forced termination functionality for OutOfMemory and OutOfMemory handling functionality. Whether the OutOfMemory handling functionality is enabled affects the operation performed when the cause of the OutOfMemory error is shortage of the Java heap, metaspace area, or compressed class space.

Table 14‒8: Operations for the cause of OutOfMemory occurrence of the forced termination functionality for OutOfMemory and OutOfMemory handling functionality

Causes of OutOfMemory occurrence

Is an operation performed for the forced termination functionality for OutOfMemory

(Operations to be performed during OutOfMemory #1)

Is an operation performed for the OutOfMemory handling functionality

(Operations to be performed during OutOfMemory)

Java heap shortage

An operation is performed

(JavaVM is terminated forcibly).

An operation is performed

(an operation is performed according to the determined results#2).

Metaspace area shortage

An operation is performed

(JavaVM is terminated forcibly).

An operation is performed

(an operation is performed according to the determined results#2).

Compressed class space shortage

An operation is performed

(JavaVM is terminated forcibly).

An operation is performed

(an operation is performed according to the determined results#2).

C heap shortage

An operation is performed

(JavaVM is terminated forcibly).

An operation is not performed

(JavaVM is terminated forcibly#3).

Unknown

An operation is not performed

(java.lang.OutOfMemoryError is thrown).

An operation is not performed

(java.lang.OutOfMemoryError is thrown).

Thread Limit

An operation is not performed

(java.lang.OutOfMemoryError is thrown).

An operation is not performed

(java.lang.OutOfMemoryError is thrown).

#1

This operation is performed when the OutOfMemory handling functionality is disabled (-XX:-HitachiOutOfMemoryHandling).

#2

If the OutOfMemoryError throwing condition is satisfied, java.lang.OutOfMemoryError is thrown. If the OutOfMemoryError throwing condition is not satisfied, the processing shifts to the forced termination functionality for OutOfMemory and JavaVM is terminated forcibly.

#3

JavaVM is terminated forcibly by the forced termination functionality for OutOfMemory.

If the OutOfMemory handling functionality is enabled and an OutOfMemory error occurs due to shortage of the Java heap, metaspace area, or compressed class space, the OutOfMemory error occurrence frequency information is output to a Java VM log file.

Default value
  • -XX:-HitachiOutOfMemoryHandling

Prerequisite options
  • -XX:+HitachiOutOfMemoryAbort

Output format

[id][Thread: thread_id]<date>[Handling: oom_count(max_oom_count)]

The following is a description of the output contents:

id

OMH (Identifier of the Java VM log file).

thread_id

Thread ID (tid output to the thread dump).

date

Date when OutOfMemory was handled.

oom_count

The total number of the current OutOfMemory error and other OutOfMemory errors that occurred in the past hour due to shortage of the Java heap, metaspace area, or compressed class space.

However, including the current OutOfMemory, even if the total value of the occurrence count within an hour exceeds 3601, the maximum value of the output items is 3601.

max_oom_count

Value specified in the -XX:HitachiOutOfMemoryHandlingMaxThrowCount option.

Examples of output

[OMH][Thread: 0x00927f48]<Tue Aug 24 19:02:19 2010>[Handling: 1(60)]

Precautions