About the OutOfMemoryError Issue of WLS

By W.ZH. Mar 30, 2009

Issue:

In the weblogic server, after several times deployment, you may get the OutOfMemoryError like this:

<Feb 5, 2009 9:41:58 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004

java.lang.OutOfMemoryError: PermGen space

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

Cause and Solve:

This may be caused by the default setup of the RAM for your Weblogic domain , it is too small.

Go to your domain directory, under the bin you will find a script called,
setDomainEnv.sh,

This file in fact is called by the startWebLogic.sh when yout domain start. Find the line with
MEM_MAX_PERM_SIZE.

set MEM_PERM_SIZE=-XX:PermSize=48m

set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m

in crease them to right number as right to your machine. then restart every thing…

This should solve your problem.

Advertisements