Changing the JVM Heap Size to Tune API Gateway Performance
The JVM heap or on-heap size indicates how much memory is allotted for server processes. At some point, you might want to increase the minimum and maximum heap size to ensure that the JVM that API Gateway uses does not run out of memory. In other words, for example, if you notice OutOfMemoryError: Java heap space for Integration Server process, then you have to increase the minimum and maximum heap size to overcome the out of memory error.
The heap size is controlled by the following Java properties specified in the custom_wrapper.conf file.
Property | Description |
wrapper.java.initmemory | The minimum heap size. The default value is 256 MB. |
wrapper.java.maxmemory | The maximum heap size. The default value is 1024 MB. |
Your capacity planning and performance analysis should indicate whether you need to set higher maximum and minimum heap size values.
To change the heap size
1. Open the custom_wrapper.conf file in a text editor.
You can find the custom_wrapper.conf file in the following location: Software AG_directory \profiles\IS_instance_name\configuration\.
2. Set the wrapper.java.initmemory and wrapper.java.maxmemory parameters so that they specify the minimum and maximum heap size required by API Gateway.
For example:
wrapper.java.initmemory=256
wrapper.java.maxmemory=1024
3. Save and close the file.
4. Restart API Gateway.
If you notice an out of memory issue for Elasticsearch, then you have to tune the Elasticsearch performance. For example, if you notice OutOfMemoryError: Java heap space for API Gateway Data Store process (that is,Elasticsearch), then you have to increase the following minimum and maximum heap size to overcome the out of memory error. Open the jvm.options file located at Software AG_directory\InternalDataStore\config and set the following parameters to configure the heap size as 4GB:
-Xms4g
-Xmx4g
where, Xms represents the initial size of total heap and Xmx represents the maximum size of total heap space. You have to restart the API Gateway Data Store for the changes to take effect.