We help IT Professionals succeed at work.

Why this error occured?

Loganathan Natarajan
on
In my struts-mysql-java application, last night I got the below problem,

Why this error occurred and what should I do?

HTTP Status 500 -
 
type Exception report
 
message
 
description The server encountered an internal error () that prevented it from fulfilling this request.
 
exception
 
javax.servlet.ServletException: GC overhead limit exceeded
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
	org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
root cause
 
java.lang.OutOfMemoryError: GC overhead limit exceeded
 
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.

Open in new window

Comment
Watch Question

Commented:
This error is thrown, when too much time is spent on Garbage Collection

Check this link..


http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.oom
Commented:
If this problem is coming very frequently..

Then you will have to seriously look into the code, to tune the usage of objects..
Loganathan NatarajanLAMP Developer
BRONZE EXPERT

Author

Commented:
oh.. thanks.., i am using "hibernate" ., also struts framework... anyhow i will fine tune my code.

i just want to know  

do you I need concentrate the JVM size on the server??? as of now it is 64MB.. hope it is flexible.,

Commented:
>> as of now it is 64MB

This is default what JVM takes..

You can try to run some load on the server for couple of hours.. if you are getting any out of memory exceptions,
then you might think of increasing the Heap Size..

You can increase the heap size.. using the options..
-Xms64m -Xmx128m to "JAVA"


Loganathan NatarajanLAMP Developer
BRONZE EXPERT

Author

Commented:
thank you so much., i will try optimizing my code as well as increasing the JVM size.,

Commented:
You might be interested in looking at this blog entry...

http://blogs.sun.com/partnertech/entry/a_short_primer_to_java
Loganathan NatarajanLAMP Developer
BRONZE EXPERT

Author

Commented:
really it is helpful.. once again thanks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.