Mail handlers are creating duplicated tickets. It seems like what happens is:
- The mail handler starts processing a big message, (a big one or one with attachments for example).
- The mail handler takes longer than the configured delay to finish processing this message. The default delay is 1 minute.
- When the configured delay finishes, the mail handler accesses the mail box and starts processing the same message again.
- It happens because JIRA didn’t finish processing the message in the first time and due to this the message was not deleted yet.
- Send an email with attachments to a mail handler with the default timeout (1 min)
The mail handler should process this email and create 1 issue with it
The connection to the mail server closes before the handler is done processing the email. Therefore that email is not removed from the mail server and at the next run the handler will process the same email again, creating duplicated issues.
The below lines are found in the logs:
This issue has multiple root-causes and it is not necessarily caused by emails bigger than 10MB. It is enough that the email handler is not done processing the incoming emails within the configured time interval.
Currently we fixed the timeout that was closing the connection before the handler is done processing so now this issue should occur less often. Once we will also fix the other cause (emails too big) then we will mark this bug a resolved.
- Increase the delay configuration in the mail handler, OR
- Remove the mails to archive or move them to a different folder/mailbox from the one that JIRA is trying to scan through. (more information in Logs Contain 'Exception: null javax.mail.FolderClosedException' when JIRA using IMAP mail server)