Mail Queue size growing when Office 365 mailbox is used
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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.
-Dmail.debug=true
- Please note this will require an application restart.
Cause
- Logs shows the authentication request from Jira to Office 365 takes 1 second per request. Which is quite large compared to normal scenario.
- As the authentication request is taking long time, the mail queue processing is slow. If the environment has large number of notifications generated, the mail queue would quickly grow.
Solution
- Moving the mail box to any other provider should resolve the mail backlog issue.