---
title: "65K issue limit in JQL functions"
canonical: "https://support.appfire.com/space/TTS/49742019/65K%20issue%20limit%20in%20JQL%20functions"
format: markdown
---
> Macro (aura-html)

## <span style="color: #0e101a">Problem</span>

<span style="color: #000000">Jira has a 65K issue limit for JQL functions by default due to the limitations of the underlying Lucene indexing mechanism, and there is a </span><span style="color: #0000ff">**[Jira issue](https://jira.atlassian.com/browse/JRASERVER-19350)**</span><span style="color: #0e101a"> for this problem. You might see the effects of this limit in TTS functions if you have many issues in your Jira instance. </span>

## <span style="color: #000000">Results</span>

<span style="color: #000000">If any custom function, including TTS custom functions, returns more than 65K issues, you will get empty results.</span>

## <span style="color: #000000">Solution</span>

<span style="color: #000000">You can increase this limit to a higher value by setting the max clauses limit in jira-config.properties file as instructed </span><span style="color: #0000ff">**[here](https://confluence.atlassian.com/jirakb/how-to-edit-the-jira-config-properties-file-317194938.html)**</span><span style="color: #0e101a">. </span><span style="color: #000000">We have summarized the steps below:</span>

1. <span style="color: #000000">Create jira-config.properties file under <jira-home> directory, if it does not already exist.</span>
2. <span style="color: #000000">Add the jira.search.maxclauses property with the new value, something higher than 65K. Please select the proper value for your environment and queries.</span>
3. <span style="color: #000000">Restart Jira.</span>

<span style="color: #000000">Alternatively, you can use date parameters in your TTS queries to narrow down your scope, as described </span><span style="color: #0000ff">***[here](https://confluence.snapbytes.com/display/TTS/JQL+Functions#JQLFunctions-dateparameters)***</span><span style="color: #4a6ee0">[.](https://confluence.snapbytes.com/display/TTS/JQL+Functions#JQLFunctions-dateparameters)</span><span style="color: #0e101a"> This way, you can lower the result count and eventually run your queries without hitting the 65K limit.</span>

> 📝 Keep in mind that the 65K limit is counted against each JQL function rather than the whole query. So even your complete query covers less than 65K issues; if any TTS JQL function exceeds this limit, you will get empty results. This case is a result of the ***[lack of query optimization in custom JQL functions](#)***. TTS has to analyze all issues in your Jira instance and has to return all matching issues no matter which conditions (project, assignee, created date, etc.) you set before.