Friday, June 11, 2010

Weblogic Managed Server goes down with java.lang.OutOfMemoryError: Java heap space

This is a short post covering how to set heap space in weblogic server(10.3.2) . Incase the weblogic managed server goes down with java.lang.OutOfMemoryError: Java heap space or java.lang.OutOfMemoryError: GC overhead limit exceeded you need to increase the heap space settings.

Modify the below file to increase the heap space.
$MW_HOME/user_projects/domains/domain_name/bin/setDomainEnv.sh

Add the environment variable USER_MEM_ARGS
USER_MEM_ARGS="-Xms4G -Xmx8G -XX:PermSize=256m -XX:MaxPermSize=512m"
export USER_MEM_ARGS

Setting this variable overwrites any default java memory arguments passed during startup.Once done restart the admin and managed servers for the change to take effect.

For starting admin server :

$MW_HOME/user_projects/domains/domain_name/bin/startWebLogic.sh

For starting managed server:

$MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh

No comments:

Post a Comment