Jira Data Center mail queue grows due to large subscription groups

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

The mail queue increases in spikes, causing delays in email notifications.

Environment

Jira Data Center

Diagnosis

In atlassian-jira.log, we see messages like these:

1 2024-08-15 12:00:01,501-0400 Sending mailitem com.atlassian.jira.mail.SubscriptionMailQueueItem id: '100001' owner: 'myuser' INFO anonymous Mail Queue Service [c.a.jira.mail.SubscriptionMailQueueItem] Sending subscription '100001' of filter '123123' to 987 recipients.

These messages are logged every time a subscription is triggered for more than 30 recipients.

Cause

The mail queue is generally a single-threaded process, so when a large number of messages are added to the queue in ashort time span (almost 1k in the example above), that introduces a delay as Jira now needs to process such a large number of notifications.

This is described also in JRASERVER-61543 - Outgoing Mail Stopped Working due to Large Group Filter Subscription.

Solution

Workaround:

  • Go to Administration

    (Auto-migrated image: description temporarily unavailable)

    > System > Mail Queue and flush the queue.

    This will create a new thread and send more messages to the SMTP server in parallel and help alleviate the issue temporarily, until the queue clears.

Definitive solution:

  • Search for "Sending subscription" entries in the logs.

  • Navigate to the endpoint /secure/ViewSubscriptions.jspa?filterId=<filter_ID> replacing the <filter_ID> by the filter referenced in the logs (123123 in our example)

  • When you hover the cursor over the Edit option, notice the subId parameter in the URL. That is the subscription ID mentioned in the logs.

  • Either disable the subscription or change the group to a smaller audience.

If none of the proposed solutions work, please check Health Check: Mail Queue

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.