How to Increase Memory Allocation to Policy Manager

book

Article ID: 129042

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction

This article will describe how to increase memory allocated to Policy Manager used for writing and editing policies held on the API Gateway. While not always needed, sometimes when there are a lot of policies or very large policies to load or policy validation is enabled/required among other reasons, it may be necessary to assign more memory to Policy Manager.

In the Policy Manager error report or logs, the following stack trace may be seen as well if it runs out of memory:

java.lang.OutOfMemoryError: Java heap space

Environment

This applies to all supported versions of Policy Manager.

Resolution

To edit the memory allocated to the Policy Manager Java application, the following steps will need to be followed:

  1. Close any running sessions of Policy Manager
  2. Open the following file in a text editor: Layer 7 Policy Manager.ini
    • This file is usually found at C:\Program Files (x86)\Layer 7 Technologies\Layer 7 Policy Manager #.#\Layer 7 Policy Manager.ini on a Windows system.
  3. Find the value starting with "-Xmx".
    • By default, it may read as "-Xmx256M"
  4. Change to "-Xmx1024M" or "-Xmx2048M" to represent 1 GB or 2 GB respectively, or higher if needed and available to the system the Policy Manager is being run from
  5. Save the Layer 7 Policy Manager.ini file
  6. Start Policy Manager and test
  7. Repeat the above steps if necessary until the memory is sufficient for the use-case

Additional Information

Another quick improvement to Policy Manager running quicker while opening and editing policies is disabling Policy Validation Feedback (found under Preferences in Policy Manager), if validation is not required for the use-case. Validation can always be run manually when needed too if it is disabled.