API Gateway Error: SoapMessageProcessingServlet: Java heap space java.lang.OutOfMemoryError
search cancel

API Gateway Error: SoapMessageProcessingServlet: Java heap space java.lang.OutOfMemoryError

book

Article ID: 272427

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

The following error was observed in a CA API Gateway ssg_*.log

2023-07-18T10:11:18.601-0700 SEVERE  1275 com.l7tech.server.SoapMessageProcessingServlet: Java heap space
java.lang.OutOfMemoryError: Java heap space
    at java.base/java.lang.StringCoding.decodeUTF8

Redacted multiple lines of stack ....

Environment

API Gateway 10.1

Cause

The error is due to improper settings.

Resolution

The appliancedefs.sh script should be used to control memory. This is only valid for Appliance Gateways and not applicable for Software Gateways. In the script, the setting was like the following (where it is mentioned that 60 percent of the memory should be used by the jvm):

NODE_OPTS="-Xss256k -XX:+UseG1GC -Xmx${java_ram}k -Xms${java_ram}k -XX:G1HeapRegionSize=${G1HeapRegionSize} -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:InitiatingHeapOccupancyPercent=70 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=60"

In the node.properties file, the java heap was explicitly defined as node.java.heap=12288

In an OVA, the node.java.heap value is conflicting with the value in the appliancedef.sh file. It is recommended to remove the node.java.heap line, if it was added on an appliance GW, so that the default the settings mentioned in the appliancedef.sh file are used. If you have a Software gateway, use the node.java.heap property to set the memory allocation.

NOTE: Do not use comments in the node.properties file i.e. # this is not a shell file.