java.lang.OutOfMemoryError: Java heap space

JIRA | Jason Smith | 3 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: https://confluence.teslamotors.com/display/NPI/Powertrain | url: /display/NPI/%28Live%29+Powertrain+Trials | userName: bdecker | action: viewpage | page: 42711013 java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421) at java.lang.StringBuilder.append(StringBuilder.java:136) at org.swift.confluence.excel.PoiSupport.generateOutput(PoiSupport.java:271) at org.swift.confluence.excel.PoiSupport.getPOIOutput(PoiSupport.java:137) at org.swift.confluence.excel.PoiSupport.process(PoiSupport.java:66) at org.swift.confluence.excel.ExcelMacro.execute(ExcelMacro.java:154) at org.swift.confluence.scriptutil.ScriptMacro.execute(ScriptMacro.java:161) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:203) at com.sun.proxy.$Proxy2129.execute(Unknown Source) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.executeMacro(ViewMacroMarshaller.java:229) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:156) {noformat}

    JIRA | 3 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

  1. Handemelindo 2 times, last 1 month ago
  2. Tahir 2 times, last 2 months ago
  3. Tahir 2 times, last 2 months ago
  4. harshg 2 times, last 3 months ago
  5. sunils 1 times, last 5 months ago
3 more registered users
16 unregistered visitors
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:3332)
    2. java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
    3. java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
    4. java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
    5. java.lang.StringBuilder.append(StringBuilder.java:136)
    5 frames
  3. org.swift.confluence
    ScriptMacro.execute
    1. org.swift.confluence.excel.PoiSupport.generateOutput(PoiSupport.java:271)
    2. org.swift.confluence.excel.PoiSupport.getPOIOutput(PoiSupport.java:137)
    3. org.swift.confluence.excel.PoiSupport.process(PoiSupport.java:66)
    4. org.swift.confluence.excel.ExcelMacro.execute(ExcelMacro.java:154)
    5. org.swift.confluence.scriptutil.ScriptMacro.execute(ScriptMacro.java:161)
    5 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  5. com.atlassian.confluence
    XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke
    1. com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:203)
    1 frame
  6. com.sun.proxy
    $Proxy2129.execute
    1. com.sun.proxy.$Proxy2129.execute(Unknown Source)
    1 frame
  7. com.atlassian.confluence
    ViewMacroMarshaller.marshalInternal
    1. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.executeMacro(ViewMacroMarshaller.java:229)
    2. com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:156)
    2 frames