Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-22664

OutOfMemoryError when indexing Excel files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.5.9
    • 3.3
    • None

      Confluence can run out of memory when indexing certain Excel 2007 (xlsx) files. When such files are uploaded, the following stack trace is seen the next time the index queue flushing job runs:

      2011-03-21 16:53:46,820 ERROR [DefaultQuartzScheduler_Worker-6] [org.quartz.core.JobRunShell] run Job DEFAULT.IndexQueueFlusher threw an unhandled Exception:
      java.lang.OutOfMemoryError: Java heap space
              at java.util.Arrays.copyOf(Arrays.java:2882)
              at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
              at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
              at java.lang.StringBuilder.append(StringBuilder.java:119)
              at com.atlassian.confluence.extra.officeconnector.index.excel.ExcelXMLTextExtractor.extractText(ExcelXMLTextExtractor.java:71)
              at com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor.addFields(BaseAttachmentContentExtractor.java:40)
              at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:45)
              at com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104)
              at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102)
              at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:43)
              at com.atlassian.confluence.search.lucene.tasks.UpdateDocumentIndexTask.perform(UpdateDocumentIndexTask.java:40)
              at com.atlassian.confluence.search.lucene.tasks.BulkWriteIndexTask.perform(BulkWriteIndexTask.java:44)
              at com.atlassian.bonnie.LuceneConnection.withWriter(LuceneConnection.java:331)
              at com.atlassian.confluence.search.lucene.tasks.LuceneConnectionBackedIndexTaskPerformer.perform(LuceneConnectionBackedIndexTaskPerformer.java:20)
              at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager$BatchUpdateAction.perform(DefaultConfluenceIndexManager.java:356)
              at com.atlassian.bonnie.LuceneConnection.withBatchUpdate(LuceneConnection.java:405)
              at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.processTasks(DefaultConfluenceIndexManager.java:155)
              at com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.flushQueue(DefaultConfluenceIndexManager.java:121)
              at sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy36.flushQueue(Unknown Source)
              at com.atlassian.confluence.search.lucene.IndexQueueFlusher.executeJob(IndexQueueFlusher.java:29)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:63)
              at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:46)
              at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
      

      A heap dump showed 900MB of com.atlassian.confluence.extra.officeconnector.index.excel.ExcelXMLTextExtractor$LiteralTextEntry objects.

      Fix

      • For Confluence 3.3.x, download and install Office Connector 1.13.1
      • For Confluence 3.5.x, download and install Office Connector 1.17 (should also work with Confluence 3.4.x, but has not been tested)
      • Or upgrade to Confluence 3.5.8 or above

              nbhawnani Niraj Bhawnani
              nbhawnani Niraj Bhawnani
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 8h
                  8h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified