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
description The server encountered an internal error () that prevented it from fulfilling this request.
javax.servlet.ServletException: GC overhead limit exceeded
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.

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

Check this link..

If this problem is coming very frequently..

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

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.,
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.

>> 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 DeveloperAuthor Commented:
thank you so much., i will try optimizing my code as well as increasing the JVM size.,
You might be interested in looking at this blog entry...

Loganathan NatarajanLAMP DeveloperAuthor Commented:
really it is helpful.. once again thanks
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

From novice to tech pro — start learning today.