Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-11725

Exporting data from a JIRA instance with a lot records in the notificationinstance table causes an OutOfMemoryException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.7
    • Fix Version/s: 5.2-m07, 5.2
    • Component/s: None
    • Environment:

      Description

      When exporting data from support.atlassian.com, the export fails with an OutOfMemoryException. This is due to the large number of records in the notificationinstance table ( more than 1.4 million). Tests were carried out using both the PostgreSQL JDBC2 and JDBC3 drivers.

      The root cause of this problem is the large number of records in the notificationinstance table. This is caused by the javamail api not providing an easy way to set the message-id (to something unique like jira.atlassian.com/JRA-11345). Instead we currently use and record the unique message ID generated by the mail server to thread e-mail in JIRA. There is however a workaround for this problem here. Once this gets implemented, we can get rid of the notificationinstance table all together.

      Workaround

      For normal backups, disabling the XML backup and replacing it with native backups is an effective strategy.

      If upgrading, rather than using an XML export it is possible to use a backup of the database generated by the DBMS. For example:

      1. Create a database backup using the native DB tools (for example mysqldump in MySQL).
      2. Create a new database and restore that backup into it.
      3. Point the new JIRA instance to that database by either modifying the dbconfig.xml or using the JIRA Configuration Tool.
      4. Start up the new instance - it will perform upgrade tasks on the database similar to if an XML backup was imported.

      The only side effect of this is it will use the schema from the backed up database - if the schema changes in later versions and we don't have upgrade tasks to modify that schema there may be minor problems such as documented in JIRA 4.0 Database Schema Changes for MySQL and Oracle. This only applies if upgrading from particularly old version such as 3.13.x and lower and can be corrected as in that documentation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andreask@atlassian.com Andreas Knecht
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: