Configuring Maximum Message Size Limits for OOM Error

[] [] [] [] [] [] [] [] [] [] [] [] [] []

Related:

  1. Configuring timeout for dummy SQL query in advanced modeSymptom You are using JDBC adapter in your scenarios with...
  2. Several open connections noticed in DB2Symptom During the processing of JDBC receiver communication channels, too...
  3. XI Adapter Engine is stuckSymptom Your J2EE Engine is stuck. XI/PI Message flow through...

Symptom

You notice that the J2EE Engine restarts frequently, due to an Out Of Memory Error(OOM) (i.e., “java.lang.OutOfMemoryError” ). Traces and thread dumps will exhibit, the following error message: “java.lang.OutOfMemoryError. The JVM(Java Virtual Machine) will exit with an exit code of 666″
Other terms

JDBC, JDBC Adapter, OutOfMemoryError, OOM , Message Size Limit, Limit Number of rows.
Reason and Prerequisites

Whenever there is a high load/high memory consumption in the JVM, an
OutOfMemory error can result. In some cases, the source table from which the Sender JDBC Adapter polls, can be filled with large data. Under such circumstances, the JDBC adapter pulls this large data and attempts to create a large payload in memory as well. This in turn leads to an OutOfMemory error.
Solution

The solution in this case , involves a preventive handling mechanism
rather than eliminating the Out of Memory Error itself. The OOM error is a runtime exception that cannot be avoided, but can only be handled in a better and more flexible way(to prevent unwanted restarts), resulting in better system stability.
As part of the OOM handling, an advanced feature has been introduced in the JDBC Sender Adapter functionality. This ensures that data is polled in a limited, batch size(based on parameters defined below) as against polling the entire data at one go.
The above feature necessitates configuration of the below mentioned parameters in the Advanced Mode Section of the Sender JDBC Adapter.
Please note that the parameters are case-sensitive.
1 – msgLimit(boolean) : This parameter is used to enable/disable the feature. When set to true, JDBC Adapter will not process messages with a size higher than that specifed via configuration of the following two parameters : ‘maxMsgSize’ and ‘maxRowSize’. For a detailed example, please refer SAP note: 1253826.
If msgLimit is set to true, then, ‘maxMsgSize’ and ‘maxRowSize’ parameters are mandatory.
2 – maxMsgSize(int) : This parameter is used to limit the message size to an optimal value. Adapter will not process messages beyond this size and the value of this parameter is considered in ‘kb’.
3 – maxRowSize(int) : This parameter is used to provide the maximum row size. This is required along with the ‘maxMsgSize’, to, calculate the maximum number of rows that can be taken up in one processing interval. The value of this parameter is considered in ‘kb’.
4 – msgLimitErrorInterval(int) : This specifies the amount of time, the adapter will wait before performing the next poll, in case of an error situation. This will ensure that the adapter will repoll only after the specified time has elapsed. The administrator can configure this to the time expected for the database to recover after an error.Value of this parameter is measured in seconds.
Sample configuration of the above parameters is attached to this note, for a ready reference.
The issue has been handled by changes in the code. The archives and the
support package stack guide can be found on the SAP Service Marketplace
as described in SAP Note 952402.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment