Reindex on OpenSearch consumes a lot of heap memory

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • 11.3.9
    • Affects Version/s: 11.3.0
    • Component/s: OpenSearch
    • None
    • 11.03
    • 3
    • Severity 2 - Major
    • 42

      Issue Summary

      Reindex on OpenSearch consumes a lot of heap memory

      Steps to Reproduce

      1. Configure Jira with OpenSearch
      2. Perform a reindex

      Expected Results

      Reindex completes successfully

      Actual Results

      • Heap consumption keeps growing as the reindex progresses
      • Eventually could result in OutOfMemoryError
      • Inspecting the heap reveals numerous instances of IssueLinkImpl

      Workaround

      Use a setting introduced in JRASERVER-67502, specifically by adding this JVM argument:
       -Djira.cache.request.bounded.enabled=true

      By default, this will limit each cache to 1000 objects, which could be reduced further with the following argument:
       -Djira.cache.request.bounded.size=200

      Effect: each cache in RequestCacheContext won't grow indefinitely. The cache will only grow up to 200 entries, then it'll start evicting old entries.

      Note that jira.cache.request.bounded.size is per thread. So the actual max size is multiplied by the number of threads, which is configured via jira.search.api.reindex.consumer.threads (default: 40).

              Assignee:
              Hendry Luk
              Reporter:
              Hendry Luk
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: