ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Enable Java Heap Dumps on OOM in Clarity

book

Article ID: 20405

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

You can enable automatic Java heap dumps to troubleshoot performance issues and OutOfMemoryError(OOM) in Clarity in CSA or properties.xml.

Environment

Release: All supported Clarity releases

Resolution

To ensure an automatic heap dump is generated on OOM for Clarity, enable in CSA:

  1. Connect to CSA (or open properties.xml for each server in cluster):
  2. Add the following argument string in the app service or/and bg service JVM parameters:
    -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=<PATH_FOLDER>\<file_name>.hprof
  3. Repeat on each server in cluster
  4. Restart the services

Next time there is an Out of Memory error (java.lang.OutOfMemoryError: Java heap space), a heap dump .hprof file will be generated under the path folder location indicated.

You can use a 3rd party tool to analyze it or contact Broadcom Support for further assistance.

Since the file is a binary file, you must zip it before moving from the server and providing to Support to avoid corruption

Additional Information

Ways of setting up the JVM outputs with examples: 

Option 1 with a File name:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\temp\myheapdump.hprof 

If you specify the file name .hprof, then only 1 file will be generated. Note: If a new OOM occurs, the file will be overwritten.

This is not a good option if you have lots of occurrences and need to track them back in time. This is a good option if you have a limited disk space


Option 2: just folder path

If you specify a directory, such as :

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\temp

Every time there is an OOM, a heap dump will be placed in this directory, and the files will not be overwritten. This may be useful if you have multiple OOM events. Ensure you have enough disk space

Attention: Since the heap dumps are large files (usually 2-6GB depending on JVM size), you must ensure you have enough disk space to enable them. This is particularly important if you do not specify a filename as multiple heap dumps may be created in the folder. 

When generating Java Heap Dump check to ensure spaces are properly used within the argument string of the APP JVM (Application Java VM Parameters) and/or BG JVM (Background Java VM Parameters).