Mail Queue size growing when Office 365 mailbox is used

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

Mail queue is constantly growing

In the logs we see that each message is taking quite a lot of time to be sent, which is causing our mail queue to increase.

Environment

Jira Service Management 4.13.3.  and later

Diagnosis

  • To get more information about the issue of Mail queue constantly growing, need to add some extra debug log entries. To have more information on what exactly is taking the long time between the "Connecting" and "Sending message".

  • Add the below mentioned parameter to Jira's JVM arguments.

1 -Dmail.debug=true
  • Please note this will require an application restart.

Cause

  • The logs show that the authentication request from Jira to Office 365 takes 1 second per request, which is quite large compared to a normal scenario.

  • As the authentication request is taking a long time, the mail queue processing is slow. If the environment has a large number of notifications generated, the mail queue will quickly grow.

Solution

  • Moving the mailbox to any other provider should resolve the mail backlog issue.

Updated on March 21, 2025

Still need help?

The Atlassian Community is here for you.