Why this error occured?

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

LVL 36
Loganathan NatarajanLAMP DeveloperAsked:
Who is Participating?
 
cmalakarConnect With a Mentor Commented:
If this problem is coming very frequently..

Then you will have to seriously look into the code, to tune the usage of objects..
0
 
cmalakarCommented:
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
0
 
Loganathan NatarajanLAMP DeveloperAuthor 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.,
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
cmalakarCommented:
>> 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"


0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
thank you so much., i will try optimizing my code as well as increasing the JVM size.,
0
 
cmalakarCommented:
You might be interested in looking at this blog entry...

http://blogs.sun.com/partnertech/entry/a_short_primer_to_java
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
really it is helpful.. once again thanks
0
All Courses

From novice to tech pro — start learning today.