When a user writes JQL queries via Jira's Advanced Search, certain fields support autocompletion, which will suggest values as the user types.
As the user types, Jira will use a thread to perform a search against what they've typed and return possible results back to the user. In large or slow instances, and depending on the field being autocompleted, this functionality may not return quickly, and can take multiple seconds.
It is possible for the user to continue typing and end up making multiple autocompletion requests before the previous requests ever complete and return to the user. Jira will not cancel or otherwise terminate previously ongoing autocompletion threads in this case.
The instance may experience high CPU load and thread utilization if too many of these threads are working on these autocompletion tasks.
Example fields include, but aren't limited to:
- Epic Link
This issue is best reproduced in environments with high concurrent user load and activity, as well as large datasets. Otherwise, the issue may be partially induced in a stock Jira instance per the following:
- Create a new Software project.
- Using the Data Generator for Jira (do not use in Production), create at least 100,000 Epics in this project.
- More will cause the issue to reproduce more severely, but will take more time to generate and index the issues.
- Using the Issue Navigator, begin creating a new JQL query (i.e. "Epic Link" = )
- Through multiple windows and perhaps through the help of other users, begin typing values into the Epic Link field. They do not have to be real values (i.e "Epic Link" = abcde..."). Avoid typing more quickly than 2-3 characters/second.
When users stop typing, suggested results will be shown.
Observe that CPU usage on the instance elevates, with the severity and duration depending on the frequency that new characters are being typed, and how many concurrent submissions are being made (i.e. other windows or users).
Thread Dumps taken during this time will show many threads consuming CPU with stack traces containing (in the below example, for Epic Links):
The following HTTP requests can be seen made against the Access Logs, showing an individual GET request per character typed:
Avoid creating or editing multiple JQL queries at the same time, or in rapid succession.
Disable JQL Auto-complete per Administration >> System >> General Configuration
Allow administrators to configure the frequency at which the browser may submit search requests.