You're viewing Apigee Edge documentation.
Go to the Apigee X documentation. info
Apigee Edge’s Message Processor is a Java-based component and uses a default heap memory size of 512 MB. However, the default heap memory size may not be sufficient for all use cases on Apigee Edge. You may need to tune the heap memory size for your Message Processors depending on your traffic and processing requirements or to address any memory-related issues.
The heap memory size of a Java application is controlled through the Java command line parameters
-Xms (minimum heap size) and
-Xmx (maximum heap size). On the Apigee
Edge Message Processors, these are controlled through the properties
bin_setenv_max_mem. You can read more about these properties in
Modifying Java memory settings.
This document explains how to configure the heap memory size on Apigee Edge’s Message Processors.
Before you begin
- If you aren’t familiar with configuring properties on Edge for Private Cloud, read How to configure Edge.
- For default and recommended Java memory settings, read Modifying Java memory settings.
Changing Heap memory size on the Message Processors
This section explains how to change heap memory size on the Message Processors. Minimum and
maximum heap memory can be configured through the properties
bin_setenv_max_mem on the Message Processor component.
To change heap memory size on the Message Processors, perform the following steps:
- Open the
/opt/apigee/customer/application/message-processor.propertiesfile on the Message Processor machine in an editor. If the file does not already exist, then create it. For example:
- Add the following lines to this file:
For example, If you want to change minimum and maximum heap on the Message Processor to 1 GB and 2 GB respectively, then add the following lines to this file:
- Save your changes.
Ensure this properties file is owned by the
apigeeuser. For example:
chown apigee:apigee /opt/apigee/customer/application/message-processor.properties
Restart the Message Processor using the following command:
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart
- If you have more than one Message Processor, repeat these steps on all the Message Processors.
Verifying Heap memory size on the Message Processors
This section explains how to verify if the heap memory changes have been successfully modified on the Message Processors.
Even though you used the properties
bin_setenv_max_mem to change the heap memory size on the Message Processor, you need to verify that the actual Java command line parameters
-Xmx have been set with the new values as follows:
- Search to see if the command line parameters
-Xmxhave been set with the new values for the Message Processor using the following command:
ps -ef | grep message-processor | egrep -o 'Xms[0-9a-z]+|Xmx[0-9a-z]+' | tr '\r' ' '
If the minimum and maximum heap memory have been changed on the Message Processor, then the
previous command shows the new value listed for
The sample result from the previous command, after you have changed the minimum and maximum heap on the Message Processor, is as follows:
In the example output, note that the new values for minimum and maximum heap have been set.
If you still see the old values for
-Xmx, then verify that you have followed all the steps outlined in Changing heap memory size on the Message Processors correctly. If you have missed any step, repeat all the steps again correctly.
- If you are still not able to change heap memory, contact Apigee Edge Support.