Modifying Java Memory Settings

Edge for Private Cloud v. 4.16.09

Depending on your traffic and processing requirements you may need to increase the heap size or class metadata size for one or more Apigee components.

To change these settings, edit the properties file for the component. If the component is installed on multiple machines, such as the Edge Message Processor, then edit the properties file on all machines hosting the component.

To set these values, set the following properties:

  • bin_setenv_min_mem - set the minimum heap size. The default is 256 MB.
  • bin_setenv_max_mem - set the maximum heap size. The default is 512 MB.
  • bin_setenv_meta_space_size - set the maximum class metadata size. The default value is set to the value of bin_setenv_max_permsize, which defaults to 128 MB. On the Message Processor, Apigee recommends that you set this value to 256 MB or 512 MB, depending on your traffic.

Set these properties for each component on the machine, using "m" suffix to indicate megabyte. For example, for the Message Processor, set them in the /opt/apigee/customer/application/message-processor.properties file as:

bin_setenv_min_mem=512m
bin_setenv_max_mem=1024m
bin_setenv_meta_space_size=1024m

If the message-processor.properties file does not exist, or if the corresponding .properties file for any Edge component does not exist, create it and then change ownership of the file to the "apigee" user:

> chown apigee:apigee /opt/apigee/customer/application/message-processor.properties

After setting the values in the .properties file, restart the component:

> /opt/apigee/apigee-service/bin/apigee-service component restart

For example:

> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart

For additional tips on configuring memory, see this article on the Edge forums.