Create Issue, Comment on Issue, Assign User, Slow due to Webhook Complexity

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

Events takes longer when there are configured WebHooks with Create Issue event, Comment or Assign User.

The WebHooks are fired asynchronously, but the logic that evaluates whether a WebHook should be called is synchronous and executes one JQL query per each configured WebHook.

On instances that have problems with slow JQLs or with overly complicated WebHook filters configured, this can increase the time it takes to perform actions in Jira.

Solution

Environment

Jira 7.x, 8.x and later

An environment where there are WebHooks with Create Issue event and with complex JQL queries. This can also affect Assign User and Comments.

Expected Results

When a customer creates an issue, they should swiftly see it's created on the UI. Slow JQLs configured for the WebHooks shouldn't impact the issue creation time.

Actual Results

The customer clicks on Create Issue, Issue is created and the logic determining which WebHooks to call is executed. After all JQL filters are executed, user sees the new issue in the UI and the actual WebHooks are called in separate background threads.

Sample log after a successful Create Issue - which takes around 1 minute to see on UI but actually it took only around 1 second:

Jira log:

1 2 3 4 5 2019-04-19 09:29:50,430 https-jsse-nio-443-exec-33 url:xxx/comment INFO I304405 569x530511x3 xxx xxx/rest/api/2/issue/xxx/comment [c.a.j.p.webhooks.matcher.JqlEventMatcher_SLOW] JQL query '{issuetype in ("Defect", "Feature", "Customer Issue", "Task")} AND {status changed} AND {assignee in ("xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx", "xx")} AND {key in ("xx")}' produced lucene query and took '52730' ms to run.

Threads:

(you should see running threads on lucene that contain com.atlassian.jira.plugins.webhooks.matcher.JqlEventMatcher.matchJql)

1 2 3 4 5 6 7 8 9 10 11 12 13 https-jsse-nio-443-exec-8 url:/rest/api/2/issue/xxxx/comment username:xxx" #52 daemon prio=5 os_prio=0 tid=0x000000003a2df000 nid=0xda8 runnable [0x0000000042a88000] java.lang.Thread.State: RUNNABLE at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:946) at org.apache.lucene.util.DoubleBarrelLRUCache.get(DoubleBarrelLRUCache.java:81) at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:220) at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:209) at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:57) ..... at com.atlassian.jira.plugins.webhooks.matcher.JqlEventMatcher.matchJql(JqlEventMatcher.java:58) at com.atlassian.jira.plugins.webhooks.matcher.JqlEventMatcher.matches(JqlEventMatcher.java:43) at com.atlassian.jira.plugins.webhooks.matcher.JqlEventMatcher.matches(JqlEventMatcher.java:22) at com.atlassian.webhooks.api.util.EventMatchers$3$1.apply(EventMatchers.java:49) at com.atlassian.webhooks.api.util.EventMatchers$3$1.apply(EventMatchers.java:45

Workaround

No workaround if Webhooks will be used. But if the aim is to increase the performance of creating issue, then Webhooks should be disabled or JQLs should be tuned.

You can however report off the following in the atlassian-jira.log

1 c.a.j.p.webhooks.matcher.JqlEventMatcher_SLOW

Find the offending Webhook and either disable it or tune the JQL.

Refer to Troubleshooting WebHooks in Jira Data Center for more details on how to parse these log entries.

More information can be found in JRASERVER-68174 - Issue Create/Update action is slow when WebHooks are configured

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.