Solved

Tomcat crashes all of sudden

Posted on 2012-04-06
8
907 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 167 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 167 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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 166 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

687 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