Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java out of memory exception

 
Dhanaraj K
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The production server crahes everyday. Help Required.

The application runs in Weblogic 8.1 SP1 on Solaris 5.9 platform. The application is crashing with Java Out of Memory Exception. I have allocated 3GB memory for the weblogic server.

Here is the settings:

JAVA_OPTIONS="-Xms3072m -Xmx3072m -XX ermSize=256m -XX:MaxPermSize=256m -verbosegc"

When I monitor the Garbage Collector logs, I can see it is relasing memory frequently.The issue is even if the JVM releases memory and not reflecting on the OS side. If I do use the top command to monitor the memory used by the process, it shows more than what is showing by the JVM. The used memory keeps on growing and once it reaches 3GB, weblogic server crashes with Java OutofMemory Exception.

Anybody faced this kind of problem. Please help me on this.

regards
Raju
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64973
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Raju K V",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Rajah Nagur
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Raju K V:
The production server crahes everyday. Help Required.

The application runs in Weblogic 8.1 SP1 on Solaris 5.9 platform. The application is crashing with Java Out of Memory Exception. I have allocated 3GB memory for the weblogic server.

Here is the settings:

JAVA_OPTIONS="-Xms3072m -Xmx3072m -XX ermSize=256m -XX:MaxPermSize=256m -verbosegc"

When I monitor the Garbage Collector logs, I can see it is relasing memory frequently.The issue is even if the JVM releases memory and not reflecting on the OS side. If I do use the top command to monitor the memory used by the process, it shows more than what is showing by the JVM. The used memory keeps on growing and once it reaches 3GB, weblogic server crashes with Java OutofMemory Exception.

Anybody faced this kind of problem. Please help me on this.

regards
Raju



Few clarifications before your question can be answered:
* What is the version of JVM ?
* How did you come up with perm size in the JVM options? Did BEA recommend?
* Have you diagnosed your code for any Memory leaks?
* Give more info about your application, ecommerce; banking etc
* Are you sure all OS patches installed?
* Can you provide part of the output of your GC file?
 
Dhanaraj K
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Few clarifications before your question can be answered:
* What is the version of JVM ? - JDK 1.4.1_03
* How did you come up with perm size in the JVM options? Did BEA recommend? - I got this information from google. Please refer to the following link - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5095540
* Have you diagnosed your code for any Memory leaks? - Yes I have done this and I couldnt find anything wrong.
* Give more info about your application, ecommerce; banking etc - This is a decision supporting system for International Carrier Services for a Telecom Provider (ISD calls). This application has two user interfaces, once for the internal users developed using swings and one for the providers using Struts framework. We do have modules which runs as seperate process (thread) not inside weblogic JVM as different java process.
* Are you sure all OS patches installed? - Yes
* Can you provide part of the output of your GC file?
[GC 2356738K->2027762K(3135488K), 0.1629899 secs]
[GC 2356786K->2027729K(3135488K), 0.1667629 secs]
[GC 2356753K->2027841K(3135488K), 0.2146292 secs]
[GC 2356865K->2028664K(3135488K), 0.1775772 secs]
[GC 2357687K->2027866K(3135488K), 0.1651523 secs]
[GC 2356889K->2027667K(3135488K), 0.1589957 secs]
[GC 2356690K->2033134K(3135488K), 0.3586702 secs]
[GC 2362158K->2035988K(3135488K), 0.4560428 secs]
[GC 2365011K->2035030K(3135488K), 0.2523187 secs]
[GC 2364054K->2034327K(3135488K), 0.2118327 secs]
[GC 2363351K->2034896K(3135488K), 0.2291791 secs]
[GC 2363920K->2035828K(3135488K), 0.2448387 secs]
[GC 2364852K->2032807K(3135488K), 0.1536226 secs]
[GC 2361822K->2038155K(3135488K), 0.3284340 secs]
[GC 2367179K->2034709K(3135488K), 0.2582696 secs]

top command on solaris platform
PIDUSERNAMETHRPRINICESIZERESSTATETIMECPUCOMMAND
18041 prod 64 34 0 3814M 2739M sleep 110.7H 0.74% java
 
Rajah Nagur
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prima facie it looks it there is a bug in JVM. Please Upgrade the JVM to 1.4.2_12. Lot of bugs related to GC have been fixed in this release.

Have the following java options enabled along with the existing options and retry :

-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc XX:+DisableExplicitGC

DisableExplicitGC is ensure that the application is not calling too many System.GC. This can degrade performance.

Collect the GC logs and use GCViewer tool to verify the GC behaviour and then you can tune accordingly.

The above bug which you have mentioned is reported against JVM 1.4.2_05 . So upgrade to 1.4.2_12 which has many GC related bugs fixed.

How many CPUs does the Solaris box have?

Keep Sun support in the loop.
 
Dhanaraj K
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks a lot for your suggestions.

The Unix box has got 12 cpus. I will suggest upgrading the JDK version as part of our next software upgrade. I cannot directly go ahead and do this, since it needs to follow process. Will upgrading the App Server to Weblogic 9.1 help?. I am not sure about the JDK version in WL9.1

Thanks & Regards
Dhanaraj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic