Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-21043

Excel Sheets with large row count causes out of memory errors

    XMLWordPrintable

    Details

      Description

      I've been able to reproduce this problem easily in Confluence 3.3.

      Steps:

      1. Create an Excel spreadsheet with data in a very high row number (the attached one has data in rows 1, 2, and 65536). This file can actually be quite small (41kb). One of our users actually did this by accident!
      2. Attach spreadsheet to a page
      3. Use the viewxls macro to display the spreadsheet on your page.

      Result: Most of the time, the page won't load - it times out or returns "Page Not Found". Sometimes it WILL load with a "viewxls: java.lang.OutOfMemoryError: Java heap space" error. Java VM Heap free space rapidly plummets (as reported by refreshing the System Info page of Confluence's Admin panel). The entire Confluence instance gets slower. Sometimes the entire Confluence installation stops responding for a little while (eventually it recovered itself).

      sample stack trace
      2010-11-24 11:18:12,051 ERROR [TP-Processor6] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: viewfile
       -- url: /display/spacekey/pageTitle | page: 34709164 | userName: admin | referer: https://confluenceURL/display/spacekey/pageTitle | action: viewpage
      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.StringBuffer.append(StringBuffer.java:224)
      	at java.io.StringWriter.write(StringWriter.java:84)
      	at com.benryan.conversion.SpreadsheetConverter.writeHeaderStyles(SpreadsheetConverter.java:204)
      	at com.benryan.conversion.SpreadsheetConverter.write(SpreadsheetConverter.java:65)
      	at com.benryan.conversion.SpreadsheetConverter.convert(SpreadsheetConverter.java:395)
      	at com.benryan.conversion.XlsConverter$1.doConversion(XlsConverter.java:42)
      	at com.benryan.conversion.DocConverter.execute(DocConverter.java:59)
      	at com.benryan.conversion.macro.ConverterMacro.execute(ConverterMacro.java:276)
      	at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:51)
      	at com.atlassian.renderer.v2.components.MacroRendererComponent.executeMacro(MacroRendererComponent.java:203)
      	at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:169)
      	at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:67)
      	at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18)
      	at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:120)
      	at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:105)
      	at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60)
      	at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46)
      	at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
      	at com.atlassian.renderer.v2.plugin.PluggableV2Renderer.render(PluggableV2Renderer.java:30)
      	at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      	at sun.reflect.GeneratedMethodAccessor393.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 com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              slancashire Steven Lancashire
              Reporter:
              rreginelli Rome Reginelli
              Votes:
              16 Vote for this issue
              Watchers:
              24 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: