IBM Support

OutOfMemory Due To Excessive SCXmlUtil Usage

Technical Blog Post


Abstract

OutOfMemory Due To Excessive SCXmlUtil Usage

Body

 

The XPATH utility functions provided by the class SCXmlUtil caches the XPath expression internally without any upper limit due to which OutOfMemory can be observed.

Classes associated with this utility are following:

com.sterlingcommerce.framework.utils.SCXmlUtils
com.sterlingcommerce.baseutil.SCXmlUtil

 

Heapdump from the out-of-memory incident will show SCXmlUtil objects as the problem suspect: 

The class "com.sterlingcommerce.baseutil.SCXmlUtil", loaded by "com.sterlingcommerce.woodstock.ldr.DynamicClassLoader @ 0x6c08f4fc8", occupies 4,516,697,685 (94.23%) bytes. The memory is accumulated in one instance of "java.util.LinkedList" loaded by "com.ibm.oti.vm.BootstrapClassLoader @ 0x6c0196860".

 

The utility is enhanced, such that the XPath expression cache limit is controlled by the system property. 

-Dscxmlutil.xpathexpr.cache.limit

 

This property is passed as a system argument at the time of JVM startup. It is used to set the maximum number of XPath expressions which can be present in the cache.

The default value of this system property is -1.

 

If the value is set to 0, then the cache is not used. 

If the value < 0, an unlimited cache is used.

 

|f there is customization which is using the SCXmlUtil utility cache,  then consider setting the cache limit to avoid any out-of-memory condition. 

For example, to set a limit of 10K Xpath expressions in the cache, pass the following system argument in the JVM startup: Dscxmlutil.xpathexpr.cache.limit=10000.
Property: -Dscxmlutil.xpathexpr.cache.limit
Recommended Value: 10000

 

For Order Management on the Cloud (OMSoC version 19.1) this cache limit for app server has been set to 10000 by default. However, this property needs to be explicit set for any agent or integration processes based on the usage. 

For adding this property as JVM argument, please refer to Configuring agent or integration servers by using the Self Service tool.

 

For Order Mangement on-prem version, refer to the fix pack release notes. 

         v9.5 - Fix Pack 10

         v10 (Included in the base version)

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11124361