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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.2-m07, 5.2
    • 3.7
    • None

      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.

              Unassigned Unassigned
              andreask@atlassian.com Andreas Knecht (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: