[Solved] Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded Confluence

Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

Most common errors in a java developed application are related to memory. OutOfMemoryError is a term which can easily be found in the errors of these applications. Confluence is a very good  solution to manage documentation of your project, product and application. If you have installed the application with standard memory settings then you will surely encounter this error “Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded” or similar errors. Some time it can come with another name like java heap space error as well. A detailed error is given as under:

Caused by: javax.servlet.ServletException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)
at org.apache.jsp._500page_jsp._jspService(_500page_jsp.java:865)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
… 92 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
May 07, 2020 8:48:02 AM org.apache.catalina.core.StandardHostValve custom
SEVERE: Exception Processing ErrorPage[errorCode=500, location=/500page.jsp]
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

Solution!!!

The solution to this error is fairly simple. You need to shutdown the confluence service from services panel. Go to bin directory under installation directory. As I was using windows environment so I used setenv.bat file to change the parameters of XMs: XMx and HeapSpace from standard 256M and 512M to 1024M for all of these options. Please changes these values according to your available memory parameters.

You can change the parameters from tomcat7w.exe or which ever version you are using like tomcat9w.exe. copy the path of this file from address bar and open a command prompt. enter the under listed command in command prompt to execute which will open the system properties. Go to Java tab to change the properties related to Java.

D:\path_to_tomcat\tomcat7w.exe //ES/Confluence_Service_Name(copy from services panel)

Confluence

Change the initial memory pool and Maximum memory pool. Also change the HeapSpace size in Java Options to maximum possible (1024M).

For more information follow the under listed URL:

configure system properties of confluence

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.