Out of Memory Error on Export Due to Coverage Plugin

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Exporting Bamboo instance fails with memory errors due to use of Coverage plugin -


2008/12/15 19:07:17 | 2008-12-15 19:07:17,922 INFO [SocketListener0-0] [XmlMigrator] Starting export of data...
INFO   | jvm 1    | 2008/12/15 19:07:17 | 2008-12-15 19:07:17,922 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.UserMapper@8a366d
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,015 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.GroupMapper@55aede
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,046 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.PipelineMapper@cb4b0
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,046 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.MailServerMapper@2aa254
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,171 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.InstantMessagingServerMapper@ba6976
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,171 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.JiraServerMapper@1f2bf45
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,187 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.LabelMapper@1e33bd2
INFO   | jvm 1    | 2008/12/15 19:07:18 | 2008-12-15 19:07:18,187 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.AuthorMapper@8f3da5
INFO   | jvm 1    | 2008/12/15 19:07:19 | 2008-12-15 19:07:19,218 INFO [SocketListener0-0] [XmlMigrator] Exporting with mapper: com.atlassian.bamboo.migration.ProjectMapper@1f58602
INFO   | jvm 1    | 2008/12/15 19:11:47 | Server daemon died!
INFO   | jvm 1    | 2008/12/15 19:11:47 | java.lang.OutOfMemoryError: Java heap space
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.nio.charset.CharsetEncoder.isLegalReplacement(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.nio.charset.CharsetEncoder.replaceWith(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.nio.charset.CharsetEncoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.nio.charset.CharsetEncoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at sun.nio.cs.SingleByteEncoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at sun.nio.cs.MS1252$Encoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at sun.nio.cs.MS1252.newEncoder(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.StringCoding$StringEncoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.StringCoding$StringEncoder.<init>(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.StringCoding.encode(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.StringCoding.encode(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.String.getBytes(Unknown Source)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at org.tanukisoftware.wrapper.WrapperManager.sendCommand(WrapperManager.java:3685)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at org.tanukisoftware.wrapper.WrapperManager.handleSocket(WrapperManager.java:3804)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at org.tanukisoftware.wrapper.WrapperManager.run(WrapperManager.java:4084)
INFO   | jvm 1    | 2008/12/15 19:11:47 | 	at java.lang.Thread.run(Unknown Source)

Cause

The third-party Coverage plug-in for Bamboo stores very large amounts of data in the Bamboo database. There are two consequences of this:

  1. Using the Coverage plug-in with an embedded Bamboo database may result in poor performance, OutOfMemoryErrors, and/or Bamboo start-up failures; and
  2. After installing the Coverage plug-in, you may encounter difficulties with Bamboo's import, export and backup features, such as OutOfMemoryErrors and corrupted export and backup files.

Precautionary Measures

To mitigate the risk of these problems, Atlassian makes the following recommendations to users of the Coverage plug-in:

  1. Atlassian strongly recommends that you migrate to a supported external database before installing this plug-in; and
  2. Once you have installed the Coverage plug-in, Atlassian strongly recommends that you regularly backup your bamboo-home and external database using external tools, as the plug-in may interfere with the reliability of Bamboo's built-in backup feature. We intend to address the underlying issue in a future release of Bamboo.

Recovery Procedure

If an instance of Bamboo is configured with an embedded database and the Coverage plug-in is failing for the reasons described above, this can be rectified by removing the Coverage plug-in's data from the database, using the following procedure.

On Linux, Mac OS X and other Unix-like platforms:

  1. Shut down Bamboo.
  2. Execute the following commands in a shell, substituting bamboo-home with the path to your Bamboo home directory:
    
          cd bamboo-home/database
    
          grep "^INSERT INTO BUILDRESULTSUMMARY_CUSTOMDATA .*'coverage\." defaultdb.script | gzip > coverage.sql.gz
    
          mv defaultdb.script defaultdb.script.backup_with_coverage
    
          gzip defaultdb.script.backup_with_coverage
    
          gunzip -c defaultdb.script.backup_with_coverage.gz | grep -v "^INSERT INTO BUILDRESULTSUMMARY_CUSTOMDATA .*'coverage\." > defaultdb.script
    
  3. Start Bamboo.

Last modified on Nov 21, 2012

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.