KB Article #167287

JVM Configuration Setting Customization

Problem

-- How to customize the API Server's JVM settings.

Resolution

* The JVM configuration files are set up to allow you to add your own JVM settings either globally, or on a per-instance basis. This is accomplished by having a system JVM.xml file that includes all the user’s customized JVM arguments. Note that the /system/conf/jvm.xml file should not be edited, as this is reserved for API Server system settings only. A user who wishes to override the JVM settings for some particular system should consult the following table and create that file if it does not exist:


JVM Configuration File
Per-Instance API Gateway /apigateway/groups/[group X]/[instance Y]/conf/jvm.xml
Global Analytics /analytics/conf/jvm.xml
Global API Gateway /apigateway/conf/jvm.xml


Note that these files are loaded in the order listed above. So items added to the classpath are appended in the order they appear, while any settings with the same name get overwritten by the last value seen. You may need to create a guard variable to make sure the settings you want get loaded.

The settings in the jvm.xml files listed in the table must all go inside a single <ConfigurationFragment> </ConfigurationFragment> tag that wraps everything in the file. The gateway processes will need to be restarted to reload the settings after making the changes. If the processes do not restart after some change, check the files for XML syntax errors, this is almost always the cause. Refer to KB 167507 for examples of common JVM parameters that one might wish to set, like Java memory.