Jira Re-index fails with the message "The query processor could not start the necessary thread resources for parallel query execution"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

After an upgrade of Jira version or an update to the database, it is noticed that during a full foreground re-index, issue indexer threads would often fail to index the issue with database related errors. The errors originating from the database would be logged by the issue indexer threads as follows

2022-10-30 11:20:53,093-0400 IssueIndexer:thread-2 WARN xxxx 163x7354475x1 1t2kogm 10.246.107.144,10.106.1.206 /secure/admin/IndexReIndex!reindex.jspa [c.a.jira.index.AccumulatingResultBuilder] com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: Error getting the next result (The query processor could not start the necessary thread resources for parallel query execution.)
java.lang.RuntimeException: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: Error getting the next result (The query processor could not start the necessary thread resources for parallel query execution.)
    com.atlassian.jira.index.DefaultIndex$Failure.<init>(DefaultIndex.java:100)
    com.atlassian.jira.issue.index.DefaultIssueIndexer$EntityOperation.lambda$perform$6(DefaultIssueIndexer.java:858)

This happens with any of the issue indexer threads and the foreground index completes with failure.

Environment

8.20.6, MS SQL server

Cause

This is mostly caused by resource contention and other configuration problems on the database. This has to be addressed by the database administrator of the MS SQL server.

Solution

Suggest to the customer to verify one of the following :

  1. Are there any indication of CPU or RAM memory exhaustion on the database coinciding with the failure reported in the logs.
  2. Check on the Max Degree of Parallelism parameter and if there were any changed made to it. Default value is set to 0 to allow the database server to decide based on the number of CPU in the instance.
  3. Check on the Max Workers Threads. It should be set to 0 by default for the DB engine to automatically chose the max number of threads.

Last modified on Nov 22, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.