• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

Tomcat crashes all of sudden

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
sasidhar1229
Asked:
sasidhar1229
3 Solutions
 
Sharon SethCommented:
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
 
Sathish David Kumar NCommented:
increase JVM size (java_opt) and try ??????
0
 
dpearsonCommented:
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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
sasidhar1229Author Commented:
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
 
dpearsonCommented:
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
 
sasidhar1229Author Commented:
No it's not. It's 32-bit Java1.5 and CentOS also 32-bit
0
 
dpearsonCommented:
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
 
arober11Commented:
As a stop gap it may be worth scheduling daily bounces of the Tomcat's.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now