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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
cmalakarCommented:
If this problem is coming very frequently..

Then you will have to seriously look into the code, to tune the usage of objects..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.