Automation For Jira - How to collect data to troubleshoot throttled Automation Rules

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

Project Automation Rules are "throttled" and not running in Jira.

This article helps identify which Service Limit was reached.

Solution

Screenshots

  • Collect screenshot showing the rule receiving the throttled message at the Automation > Click the 3 dots "..." > Audit log

  • Collect ScreenShot showing the Performance insights graphs:

    1. Automation > Click the 3 dots "..." > Select View Performance Insights

    2. At the top, select 1w, so we can observe the limits used during a full week

    3. Take screenshots changing the multiple options at the select box (Execution count, Average duration, Total duration) for the rule "When an intake form is requested, send email"

REST API endpoints output

  • Call the following REST API endpoint to collect the actual Service Limits:

https://YOUR_JIRA_INSTANCE_URL/rest/cb-automation/latest/configuration/property

Database queries

  • There are some SQL queries we can run to find check how the parameters are going in Jira. Replace the date with the day when the throttled occurred:

Postgres

Processing time per day

SELECT sum("DURATION")/1000 as "Processing Time (s)", date_trunc('day',"START_TIME") as "Date" FROM "AO_589059_AUDIT_ITEM" a WHERE "START_TIME" > '2020-10-15 00:00:00' group by "Date" ORDER BY "Date"

Processing time per rule per day

SELECT "OBJECT_ITEM_NAME", sum("DURATION")/1000 as "Processing Time (s)", date_trunc('day',"START_TIME") as "Date" FROM "AO_589059_AUDIT_ITEM" WHERE "START_TIME" > '2020-10-15 00:00:00' group by "Date","OBJECT_ITEM_NAME" ORDER BY "Processing Time (s)" DESC

Items queues globally - Queued Daily Items

SELECT count(comp."ID") as "Queued Items", date_trunc('day',comp."START_TIME") as "Date" FROM "AO_589059_AUDIT_ITEM_COMP_CGE" comp WHERE comp."START_TIME" > '2020-10-15 00:00:00' GROUP BY "Date" ORDER BY "Date"

Queued Daily Items by Rule

SELECT a."OBJECT_ITEM_NAME" as "Rule Name", count(comp."ID") as "Queued Items", date_trunc('day',comp."START_TIME") as "Date" FROM "AO_589059_AUDIT_ITEM_COMP_CGE" comp JOIN "AO_589059_AUDIT_ITEM" a on a."ID"=comp."AUDIT_ITEM_ID" WHERE comp."START_TIME" > '2020-10-15 00:00:00' GROUP BY a."OBJECT_ITEM_NAME","Date" ORDER BY "Queued Items" DESC

MySQL

Processing time per day

SELECT SUM(DURATION)/1000 AS `Processing Time (s)`, DATE_FORMAT(START_TIME, '%Y-%m-%d') AS `Date`FROM `AO_589059_AUDIT_ITEM`WHERE START_TIME > '2022-01-15 00:00:00'GROUP BY `Date`ORDER BY `Date`;

Processing time per rule per day

SELECT OBJECT_ITEM_NAME, SUM(DURATION)/1000 AS `Processing Time (s)`, DATE_FORMAT(START_TIME, '%Y-%m-%d') AS `Date`FROM AO_589059_AUDIT_ITEMWHERE START_TIME > '2020-10-15 00:00:00'GROUP BY `Date`, OBJECT_ITEM_NAMEORDER BY `Processing Time (s)` DESC;

Items queues globally - Queued Daily Items

SELECT COUNT(comp.ID) AS `Queued Items`, DATE_FORMAT(comp.START_TIME, '%Y-%m-%d') AS `Date`FROM AO_589059_AUDIT_ITEM_COMP_CGE compWHERE comp.START_TIME > '2020-10-15 00:00:00'GROUP BY `Date`ORDER BY `Date`;

Queued Daily Items by Rule

SELECT a.OBJECT_ITEM_NAME AS `Rule Name`, COUNT(comp.ID) AS `Queued Items`, DATE_FORMAT(comp.START_TIME, '%Y-%m-%d') AS `Date`FROM AO_589059_AUDIT_ITEM_COMP_CGE compJOIN AO_589059_AUDIT_ITEM a ON a.ID = comp.AUDIT_ITEM_IDWHERE comp.START_TIME > '2020-10-15 00:00:00'GROUP BY a.OBJECT_ITEM_NAME, `Date`ORDER BY `Queued Items` DESC;

Warning

All queries above are examples built for Postgres and MySQL syntax. You may need to edit them to work on your specific database.

Sending data to Atlassian Support

Attach the following data to your Support ticket:

  1. Screenshots from the Automation audit log;

  2. Screenshots from the Performance insights graphs

  3. A Jira Support Zip

  4. The output of the REST API call

  5. The queries results

Updated on May 31, 2024

Still need help?

The Atlassian Community is here for you.