# Viewing pages with view Office macros causes system to hang prior to Confluence 3.3

#### Still need help?

The Atlassian Community is here for you.

## Problem

Confluence pages with embedded office macros for large office 2007 xml based formats (eg. docx, xlsx, pptx) take a long time to load or the system becomes unresponsive. The document the view macro refers to is usually large in size (> 4mb).

Thread dumps of the server show one or many threads stuck in a running state:

"http-80-24" daemon prio=6 tid=0x5c689400 nid=0x7e8 runnable [0x655cb000..0x655cfa98\]
at com.jxcell.util.CharBuffer.growSize(EYFN)
...
at com.jxcell.View.Z(EYFN)
at com.jxcell.View.getFormattedText(EYFN)
at com.benryan.conversion.XlsConverter$1.doConversion(XlsConverter.java:53) at com.benryan.conversion.DocConverter.execute(DocConverter.java:53) at com.benryan.conversion.macro.ConverterMacro.execute(ConverterMacro.java:276) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:51) ... at$Proxy58.convertWikiToXHtml(Unknown Source)
at com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:193)


## Causes

The root cause is due to 3rd party library that Confluence uses to open and read the Office 2007 xml based files. The Office Connector attempts to build an object map of the file to display. Large office xml based files generate very large object maps for the plugin to process causing the large amounts of processing power (CPU) to be consumed. This causes the system to become unresponsive. The user notices the page takes a long time to load.

## Workaround

The following may resolve some of the symptoms:

Confluence must be restarted in order to terminate the currently running threads that are processing the view macro.

1. Convert the document to binary office 2000/2003 format (eg. *.doc, *.xls), and refer to this in the view office macro.
2. Temporarily disable the following items in Office Connector Plugin:
1. *viewxls (disables viewxls macro)
2. viewfile (this will still show the view link on the attachment page, but the resulting page after clicking the link will show a Unknown macro: viewfile entry).
3. Edit office document on attachment page (disables the the edit link).

## Resolution

Upgrade to version 3.3 or later. Track a permanent fix for this problem at CONF-19674.