XML export Memory issue
Asked by Samuel Gatica:

Hi Team,

We are running Confluence 4.0.4, with 1024MB of heap size memory, but each time we try to export the XML, we are getting a memory issue,

heapsize.JPG

javax.servlet.ServletException: Servlet execution threw an exception

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)

com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)

com.atlassian.confluence.security.websudo.MessagesDecoratorFilter.doFilter(MessagesDecoratorFilter.java:59)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)

com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)

com.atlassian.confluence.jmx.JmxFilter.doFilter(JmxFilter.java:106)

com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:19)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.confluence.util.LoggingContextFilter.doFilter(LoggingContextFilter.java:40)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.confluence.web.filter.ThreadLocalCacheFilter.doFilter(ThreadLocalCacheFilter.java:22)

com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:44)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:211)

com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98)

com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:30)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)

com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)

com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:37)

com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72)

org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)

com.atlassian.spring.filter.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:29)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

com.atlassian.confluence.util.ConfluenceErrorFilter.doFilter(ConfluenceErrorFilter.java:22)

com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)

com.atlassian.confluence.core.datetime.RequestTimeThreadLocalFilter.doFilter(RequestTimeThreadLocalFilter.java:35)

com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:80)

com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51)

com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)

com.atlassian.confluence.extra.webdav.servlet.filter.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:427)

com.atlassian.confluence.extra.webdav.servlet.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:34)

com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)

com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)

com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)

com.atlassian.confluence.web.filter.validateparam.RequestParamValidationFilter.doFilter(RequestParamValidationFilter.java:58)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.confluence.plugin.servlet.filter.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:71)

com.atlassian.confluence.web.filter.LanguageExtractionFilter.doFilter(LanguageExtractionFilter.java:54)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.confluence.util.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:25)

com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)

com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)

com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)

root cause

java.lang.OutOfMemoryError: Java heap space note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

Apache Tomcat/6.0.32

We have also enabled GC collection but the log was not wrote.

----------------------------------------------------------------

Can you please help us to overcome this issue.

Thanks in advance

[](https://community.atlassian.com/t5/Confluence-questions/XML-export-Memory-issue/qaq-p/157978?attachment-id=11082){#link_118863279009fb}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/26460/1/setenv.bat.JPG){#display_118863279009fb_0}  
atlassian-confluence.log  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/26460/2/atlassian-confluence.log){#display_118863279009fb_2}  
[](https://community.atlassian.com/t5/Confluence-questions/XML-export-Memory-issue/qaq-p/157978?attachment-id=11084){#link_118863279009fb_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/26460/3/heapsize.JPG){#display_118863279009fb_4}


Answers:
author: Samuel Gatica
body: Hi,

We haven't heard back from you, what would be the next step.+

+Thanks


author: Samuel Gatica
body: Hi Renato,

Thanks for your help,

I ran into issues after making these changes:

change heap size to 2048 (initial and max both)

2. Add the verbose GC lines mentioned in the technote url to the setenv.bat file

After making these changes, it failed to restart. After trying couple of attempts, figured out that 2048 seems to be out of its range on this server and then reverted it to 1024 to get it started. As the process was hung due to initial attempts, I had to reboot the box itself.


author: rrudnicki
body: Hi Samuel,

```
java.lang.OutOfMemoryError: Java heap space note The full stack trace of the root cause is available in Apache
```

As we can see, you don't have enough memory. If your environment is huge, probably a XML export isn't the best option. On this case, a database dump may be more useful.

However, you can try to increasing the Tomcat memory like this and perform again a xml backup:

```
-Xms2048m -Xmx4096m -XX:MaxPermSize=512m
```

Regards,

Renato Rudnicki


Tags: confluence-administration