Solved

Tomcat crashes all of sudden

Posted on 2012-04-06
8
895 Views
Last Modified: 2012-05-23
We are getting out of memory errors for every 2 or 3 days for past 1 or 2 months.

Earlier we never faced this problem. It is working fine for past 3 years.

Only one change we made i.e. https. We configured https few months back.

The error looks like this :

Exception java.lang.OutOfMemoryError: requested 65536000 bytes for GrET* in /BUILD_AREA/jdk1.5.0_22/hotspot/src/share/vm/utilities/growableArray.cpp. Out of swap space?


Os is Centos 5 and 4 GB Ram and tomcat 6.0.20

CATALINA_OPTS="-server -XX:+UseParallelGC -Xmx2348m -Xms2348m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SurvivorRation:6 *****"

If we increase the ram to 8GB or above will it solves the problem?
0
Comment
Question by:sasidhar1229
8 Comments
 
LVL 12

Accepted Solution

by:
Sharon Seth earned 167 total points
Comment Utility
There was a bug opened against Sun on this , but this was eventually closed with Sun saying that it could be a third party vendor issue. Suggestions from that bug report:

1. you should establish whether any third-party native code is being used, and if so, use the appropriate tools (such as libumem & mdb on Solaris) to try and pin-point the leak.
2. If no third-party native code is being used, or the leak appears to be coming from the VM/library code then please test using the latest VM update available


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6327914
0
 
LVL 20

Assisted Solution

by:Sathish David Kumar N
Sathish David  Kumar N earned 167 total points
Comment Utility
increase JVM size (java_opt) and try ??????
0
 
LVL 26

Expert Comment

by:dpearson
Comment Utility
Which version of the Java JDK are you using?  "java -version" will show you.

I think CentOS 5 by default only came with a 32-bit JDK 1.4.  If that's the case I'd suggest trying a move up to a 64-bit JDK 1.6 (don't use 1.7 it's a bit too raw still) and push the memory to 8GB.  You can install a second Java alongside the existing one (so easy to rollback if this doesn't help) and then just change where JAVA_HOME points to.

Then check the amount of memory Tomcat is actually using after this and see if it's getting close to the limit or not.

Doug
0
 

Author Comment

by:sasidhar1229
Comment Utility
Thanks for all your suggestions, I am using java1.5. For upgrading it to 1.6 we have to think of it. And I will try to increase the memory to 8GB. Let's see what happens after that.

Thanks,
Sasidhar.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 26

Expert Comment

by:dpearson
Comment Utility
I assume it's 64-bit Java 1.5?  Otherwise you won't get far with trying to raise the memory to 8GB.

Doug
0
 

Author Comment

by:sasidhar1229
Comment Utility
No it's not. It's 32-bit Java1.5 and CentOS also 32-bit
0
 
LVL 26

Assisted Solution

by:dpearson
dpearson earned 166 total points
Comment Utility
Normally a 32-bit OS is limited to 4GB of addressable memory, although some OSes added special support to their 32-bit solutions to allow access to more through some special paging tricks.  Not sure if CentOS 5 has that.

In any case 32-bit Java will definitely be limited to 4GB of RAM (a 32-bit pointer can only represent 4 billion unique values).

So you won't be able to move up to 8GB for Java unless you move to a 64-bit architecture.

Doug
0
 
LVL 26

Expert Comment

by:arober11
Comment Utility
As a stop gap it may be worth scheduling daily bounces of the Tomcat's.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now