Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-4340

Mails should be removed from mailitemchunk table after being successfully processed

    • 3
    • 29
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding suggestion.

      Problem Definition

      Currently JEPP stores all mails fetched from the mail server into AO_2C4E5C_MAILITEMCHUNK table and keeps them in the table for a period of time (45 days by default, minimum 14 days).
      This causes the DB size to increase really quick.

      This table's main purpose is to make sure Service Desk will process all mails fetched from the mail server and, in case of any problems, keep the email for reprocessing in the future so it isn't lost.

      Suggested Solution

      We should remove the mails successfully processed right after they are processed to avoid storing information that won't be needed.

      Workaround 1 (if not implemented already)

      Reduce the mail retention interval from the default 45 days to 14 via JIRA -> Settings -> Global Mail - > DB Cleaner

      Workaround 2

      The retention period can be set via a direct database update. Please reach out to support for further guidance on this.

      Note: In case of performing Workaround 1 and Workaround 2, be mindful of a potential impact on the database server. In case of MS SQL for example, temb db and MS SQL will grow extremely quickly on cleaning up large tables, so best to perform both these workarounds in a controlled and staged manner

          Form Name

            [JSDSERVER-4340] Mails should be removed from mailitemchunk table after being successfully processed

            David added a comment -

            To be clear the tempdb on MSSQL grows at an alarming rate depending on your MAILCHUNK table size.
            The DB that holds the MAILCHUNK table will have massive log growth also which needs to be handled

            Alex,

            The deletion works as I had a 200GB table and I have reduced it to 101GB with more to go. Depending on what product you are using you need to be patient as it takes Jira some time to clean out.

            David added a comment - To be clear the tempdb on MSSQL grows at an alarming rate depending on your MAILCHUNK table size. The DB that holds the MAILCHUNK table will have massive log growth also which needs to be handled Alex, The deletion works as I had a 200GB table and I have reduced it to 101GB with more to go. Depending on what product you are using you need to be patient as it takes Jira some time to clean out.

            Hi,

            Is there any way to change the number of days after these are deleted ? 

            We are not even sure the deletion actually works, since the table now has 44GB on one of the instances I administer. That is huge and increases the costs for infrastructure too much.

            Alexandru Luchian Constantinescu added a comment - Hi, Is there any way to change the number of days after these are deleted ?  We are not even sure the deletion actually works, since the table now has 44GB on one of the instances I administer. That is huge and increases the costs for infrastructure too much.

              Unassigned Unassigned
              malmeida Marcus Silveira
              Votes:
              23 Vote for this issue
              Watchers:
              19 Start watching this issue

                Created:
                Updated: