java.lang.OutOfMemoryError: Java heap space

JIRA | Jason Smith | 4 months ago
  1. 0

    From Jason D Smith: Situation: A user has a 6mb spreadsheet. They attached it to page A. On page B, they used the Excel macro to embed the spreadsheet. Result: On page load, Confluence runs out of memory. Troubleshooting done: We have a ticket open with Atlassian. After they analyzed a heap dump, they pointed us to the page in question. I replicated this problem (OOM) with the same spreadsheet in our dev environment of Confluence. We also tried using the “Office Excel” macro and it said that it wouldn’t allow it because the file was over 2MB. Expected results (?): Plugin either rejects files over a certain size (maybe 2MB) in order to prevent OOM, or it becomes more robust in its rendering of them in order to avoid OOM. More info: We have over 12GB in total heap. At the moment, for reference, we have 6GB free heap, so it’s not like we were already against the wall in terms of memory. This quote is from Atlassian: bq. “Looks like the log files show exactly one of the pages that cause the issue: {noformat} 2016-09-08 11:13:01,969 ERROR [http-nio-8090-exec-20] [xhtml.view.macro.ViewMacroMarshaller] marshalInternal Error rendering macro: excel -- referer: | url: /display/NPI/%28Live%29+Powertrain+Trials | userName: bdecker | action: viewpage | page: 42711013 java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf( at java.lang.AbstractStringBuilder.expandCapacity( at java.lang.AbstractStringBuilder.ensureCapacityInternal( at java.lang.AbstractStringBuilder.append( at java.lang.StringBuilder.append( at org.swift.confluence.excel.PoiSupport.generateOutput( at org.swift.confluence.excel.PoiSupport.getPOIOutput( at org.swift.confluence.excel.PoiSupport.process( at org.swift.confluence.excel.ExcelMacro.execute( at org.swift.confluence.scriptutil.ScriptMacro.execute( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke( at com.sun.proxy.$Proxy2129.execute(Unknown Source) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.executeMacro( at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal( {noformat}

    JIRA | 4 months ago | Jason Smith
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    Why my testNG test gets java.lang.OutOfMemoryError

    Stack Overflow | 2 years ago | Owen Cao
    java.lang.OutOfMemoryError: Java heap space
  3. 0

    Test failures don't cause overall test failure

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

    Automated exception search integrated into your IDE

  5. 0

    OutOfMemory with JMH and Mode.AverageTime

    Stack Overflow | 1 year ago | Laurent
    java.lang.OutOfMemoryError: Java heap space
  6. 0

    GitHub comment 20#140366924

    GitHub | 1 year ago | Pawamoy
    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
    1. java.util.Arrays.copyOf(
    2. java.lang.AbstractStringBuilder.expandCapacity(
    3. java.lang.AbstractStringBuilder.ensureCapacityInternal(
    4. java.lang.AbstractStringBuilder.append(
    5. java.lang.StringBuilder.append(
    5 frames
  3. org.swift.confluence
    1. org.swift.confluence.excel.PoiSupport.generateOutput(
    2. org.swift.confluence.excel.PoiSupport.getPOIOutput(
    3. org.swift.confluence.excel.PoiSupport.process(
    4. org.swift.confluence.excel.ExcelMacro.execute(
    5. org.swift.confluence.scriptutil.ScriptMacro.execute(
    5 frames
  4. Java RT
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(
    4. java.lang.reflect.Method.invoke(
    4 frames
  5. com.atlassian.confluence
    1. com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(
    1 frame
  6. com.sun.proxy
    1. com.sun.proxy.$Proxy2129.execute(Unknown Source)
    1 frame
  7. com.atlassian.confluence
    1. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.executeMacro(
    2. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(
    2 frames