Hi Team,
I getting the below error often "GC Overhead limit exceeded" or "Java heap space error" while doing the manual backup in Confluence. Currently my Java VM Memory Statistics is as below in setenv.sh
JAVA_OPTS="-Xms1769m -Xmx1769m -XX:MaxPermSize=640m $JAVA_OPTS -Djava.awt.headless=true "
Error Logs:
javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
at net.sf.hibernate.type.LongType.get(LongType.java:21)
javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded at net.sf.hibernate.type.LongType.get(LongType.java:21) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53) at net.sf.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:61) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:690) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:631) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:590) at net.sf.hibernate.loader.Loader.getRow(Loader.java:505) at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:218) at net.sf.hibernate.loader.Loader.doQuery(Loader.java:285) at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138) at net.sf.hibernate.loader.Loader.doList(Loader.java:1063) at net.sf.hibernate.loader.Loader.list(Loader.java:1054) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1533) at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1525) at sun.reflect.GeneratedMethodAccessor682.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.orm.hibernate.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1123) at $Proxy99.find(Unknown Source)
Hi Saravanan,
First and foremost, please understand that ConfluenceXML backup and restore feature is meant for evaluation purposes and it has been known to be unreliable for huge instances. Also, it require a huge resources from Confluence to generate the backup everyday.
We highly recommend you to follow this backup method for your production instance:
If you still want to try the XML backup strategy, please try to configure the following parameter:
JAVA_OPTS="-Xms2048m -Xmx4096m -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true"
Hope it helps.
Cheers,
Septa Cahyadiputra
Hi, I don't think it is a PermGen issue, but a heap issue. I would increase the heap memory instead. Set Xmx higher if possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harry,
Thanks for your reply. Could you please give me the exact heap memory size i should increase ?
Currently my Java VM Memory Statistics is as below in setenv.sh
JAVA_OPTS="-Xms1769m -Xmx1769m -XX:MaxPermSize=640m $JAVA_OPTS -Djava.awt.headless=true "
I have tried adding 128 M in MaxPermSize ie) 640 + 128 = 768m, but it works only for the first time after the server restart. after that the next day it will through the same error. Can you explain me with the exact size I need to increase in order to avoid the error ?
Thanks,
Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Current Confluence Version : 4.2.8
Java : 64 bit
backup size : 741M daily-backup-2013-02-13.zip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is this Java 6 or Java 7? GC Overhead Limit Exceeded means not enough heap memory generally. I suspect >2GB would be required, but I don't have a hard number. You'll need to do some testing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harry,
JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
Can i increase the below memory size?
JAVA_OPTS="-Xms2048m -Xmx4096m -XX:MaxPermSize=1024m $JAVA_OPTS -Djava.awt.headless=true"
Old Java Heap size :
JAVA_OPTS="-Xms1769m -Xmx1769m -XX:MaxPermSize=640m $JAVA_OPTS -Djava.awt.headless=true "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Team,
Can any one advise on this issue ?
Thanks
Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a community forum. If you need Atlassian support from the Atlassian support staff, you should create a ticket with Atlassian support.
Either way, upgrading to Java 7 should fix things up. It reduces memory. Updating your settings as you have put it would improve the situation too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.