?
Solved

Tomcat crashes all of sudden

Posted on 2012-04-06
8
Medium Priority
?
908 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 12

Accepted Solution

by:
Sharon Seth earned 501 total points
ID: 37817358
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 501 total points
ID: 37818359
increase JVM size (java_opt) and try ??????
0
 
LVL 28

Expert Comment

by:dpearson
ID: 37818360
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:sasidhar1229
ID: 37818376
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
 
LVL 28

Expert Comment

by:dpearson
ID: 37818391
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
ID: 37818407
No it's not. It's 32-bit Java1.5 and CentOS also 32-bit
0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 498 total points
ID: 37819666
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
ID: 37848632
As a stop gap it may be worth scheduling daily bounces of the Tomcat's.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

770 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