java.lang.OutOfMemoryError: Java heap space

Atlassian JIRA | Niraj Bhawnani | 6 years ago
  1. 0

    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: {noformat} 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) {noformat} A heap dump showed 900MB of {{com.atlassian.confluence.extra.officeconnector.index.excel.ExcelXMLTextExtractor$LiteralTextEntry}} objects. h3. 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

    Atlassian JIRA | 6 years ago | Niraj Bhawnani
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    resume fail with OutOfMemoryError while appending to tree log

    GitHub | 3 years ago | jheled
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    JarAnalyzer can run out of memory (Bugzilla #18602)

    GitHub | 4 years ago | vladak
    java.lang.OutOfMemoryError: Java heap space
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Increase Java heap space for language-identifier plugin-in in nutch

    Stack Overflow | 5 years ago | user200340
    java.lang.reflect.InvocationTargetException
  6. 0

    Junit testing in play with java.lang.OutOfMemoryError has been caught, Java heap space

    Stack Overflow | 4 years ago | user1179321
    java.lang.OutOfMemoryError: Java heap space
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.OutOfMemoryError

    Java heap space

    at java.util.Arrays.copyOf()
  2. Java RT
    StringBuilder.append
    1. java.util.Arrays.copyOf(Arrays.java:2882)
    2. java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    3. java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
    4. java.lang.StringBuilder.append(StringBuilder.java:119)
    4 frames
  3. com.atlassian.confluence
    ExcelXMLTextExtractor.extractText
    1. com.atlassian.confluence.extra.officeconnector.index.excel.ExcelXMLTextExtractor.extractText(ExcelXMLTextExtractor.java:71)
    1 frame
  4. com.atlassian.bonnie
    BaseAttachmentContentExtractor.addFields
    1. com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor.addFields(BaseAttachmentContentExtractor.java:40)
    1 frame
  5. com.atlassian.confluence
    ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields
    1. com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:45)
    1 frame
  6. com.atlassian.bonnie
    BaseDocumentBuilder.getDocument
    1. com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104)
    1 frame
  7. com.atlassian.confluence
    BulkWriteIndexTask.perform
    1. com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102)
    2. com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:43)
    3. com.atlassian.confluence.search.lucene.tasks.UpdateDocumentIndexTask.perform(UpdateDocumentIndexTask.java:40)
    4. com.atlassian.confluence.search.lucene.tasks.BulkWriteIndexTask.perform(BulkWriteIndexTask.java:44)
    4 frames
  8. com.atlassian.bonnie
    LuceneConnection.withWriter
    1. com.atlassian.bonnie.LuceneConnection.withWriter(LuceneConnection.java:331)
    1 frame
  9. com.atlassian.confluence
    DefaultConfluenceIndexManager$BatchUpdateAction.perform
    1. com.atlassian.confluence.search.lucene.tasks.LuceneConnectionBackedIndexTaskPerformer.perform(LuceneConnectionBackedIndexTaskPerformer.java:20)
    2. com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager$BatchUpdateAction.perform(DefaultConfluenceIndexManager.java:356)
    2 frames
  10. com.atlassian.bonnie
    LuceneConnection.withBatchUpdate
    1. com.atlassian.bonnie.LuceneConnection.withBatchUpdate(LuceneConnection.java:405)
    1 frame
  11. com.atlassian.confluence
    DefaultConfluenceIndexManager.flushQueue
    1. com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.processTasks(DefaultConfluenceIndexManager.java:155)
    2. com.atlassian.confluence.search.lucene.DefaultConfluenceIndexManager.flushQueue(DefaultConfluenceIndexManager.java:121)
    2 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor620.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:597)
    3 frames
  13. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  14. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  15. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  16. Unknown
    $Proxy36.flushQueue
    1. $Proxy36.flushQueue(Unknown Source)
    1 frame
  17. com.atlassian.confluence
    AbstractClusterAwareQuartzJobBean.executeInternal
    1. com.atlassian.confluence.search.lucene.IndexQueueFlusher.executeJob(IndexQueueFlusher.java:29)
    2. com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:63)
    3. com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:46)
    3 frames
  18. Spring Context Support
    QuartzJobBean.execute
    1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
    1 frame