-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: 10.7.0, 11.3.0, 11.3.10
-
Component/s: Project - Agile Boards, Search - Search API
-
None
-
10.07
-
2
-
Severity 2 - Major
-
1
Issue Summary
On Jira Software 10.7.0+ using Lucene, loading a rapid board backlog can retain a very large number of issue documents in memory and cause an OutOfMemoryError.
The rapid board search uses a batch-oriented search API. When the effective Lucene result window is unlimited, the request loads the selected fields for all matching issues into an in-memory SearchResponse before Jira Software processes them into backlog entries.
This can affect requests to:
/rest/greenhopper/1.0/xboard/plan/backlog/data.json
The result limit passed by Jira Software is based on the search platform maximum result window. On Lucene, this remains effectively unlimited unless the Lucene search-limit dark feature is enabled.
Steps to Reproduce
- Use Jira Software with Lucene as the search platform
- Create or use a rapid board whose backlog search has a very large candidate result set
- Load the board backlog, or send a request to:
/rest/greenhopper/1.0/xboard/plan/backlog/data.json
- Repeat the request concurrently or refresh the backlog page while the original request is still running
- Observe heap usage or capture a heap dump while the requests are in progress
Expected Results
The backlog request should use bounded or streaming processing.
The request should not retain selected Lucene document fields for every matching issue at the same time. The configured search result window should protect both OpenSearch and Lucene deployments.
Actual Results
The backlog request can use an effective result window of Integer.MAX_VALUE on Lucene.
Jira Software loads selected fields for all matching issues into SearchHit objects and retains them in the SearchResponse before processing the results into RapidIssueEntry objects.
On a large instance, a single request can retain many gigabytes of heap. Multiple concurrent requests, for example after a user refreshes a stalled backlog page, can exhaust the Java heap and terminate the node.
The below exception is thrown in the atlassian-jira.log file:
java.lang.OutOfMemoryError: Java heap space
Workaround
Enable the Lucene search-result limit dark feature:
com.atlassian.jira.lucene.search.limit.enabled
This applies the configured search platform maximum result window to all Lucene search requests on the Jira instance, not only Jira Software rapid-board backlog requests. The default maximum result window is 10,000 results.
Administrators should assess the effect on integrations, apps, and custom workloads that currently request more than the configured result window.
- relates to
-
JRASERVER-66791 Make Lucene Search with unlimited PageFilter fail to prevent unnecessary memory allocation
-
- Gathering Impact
-
- is caused by
-
DCDORA-1587 Loading...