Solved

Tomcat crashes all of sudden

Posted on 2012-04-06
8
904 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 27

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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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 27

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 27

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

749 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