Empty filters cause OOME errors in JIRA

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

JIRA Server instances with over 1 million issues experience outages (not responding for some time), or throw Out of Memory Errors (OOME) when using EMPTY JQL filters.

Cause

The problem occurs when you use empty filters in certain gadgets and boards in JIRA. A filter with an empty JQL query retrieves all existing issues by default, which results in OOME errors, and the same applies to filters that retrieve a large number of results. It's common if you use such filters in these cases:

  • Generating some reports (Single Level Group By Report)
  • Creating some gadgets (Two Dimensional Filters Statistics)
  • Scrum or Kanban boards
  • Exporting search results

Resolution

To solve the problem, follow these steps:

  1. Find all empty filters in your JIRA instance by using the following SQL query. The query retrieves all rows from the "searchrequest" table where the "REQCONTENT" column is null or empty.

    SELECT * FROM searchrequest WHERE REQCONTENT = '' OR REQCONTENT IS NULL;


    If you're using Oracle as the database, use this modified query:

    SELECT * from searchrequest WHERE REQCONTENT IS NULL OR dbms_lob.getlength(TRIM (REQCONTENT)) = 0;


    Here are some sample results returned by the query:

    ID  FILTERNAME  AUTHORNAME  DESCRIPTION  USERNAME  GROUPNAME  PROJECTID  REQCONTENT  FAV_COUNT  FILTERNAME_LOWER  
    10000Filter for kanban boardjohn.smithnulljohn.smithnullnull''0filter for kanban board



  2. Either delete all empty filters, or ask users who created these filters to fill them in with proper JQL queries.


To avoid empty filters in the future, we've improved user experience around creating filters. Your users are warned when creating an empty filter, and also asked to run the query before saving it. For more info, see  JRASERVER-66390 - Getting issue details... STATUS

Last modified on Dec 8, 2021

Was this helpful?

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