Troubleshooting Startup Issue OutOfMemoryError PermGen Space

Troubleshooting Startup Issue OutOfMemoryError PermGen Space

Troubleshooting Startup Issue OutOfMemoryError PermGen Space

Troubleshooting Oracle Weblogic Server: Startup Issue: OutOfMemoryError PermGen Space –

ERROR:

If you are hitting the issue “java.lang.OutOfMemoryError: PermGen space” while starting the AdminServer on your server then follow the below steps to fix the issue.

In AdminServer log file $DOMAIN_HOME/servers/AdminServer/logs, it shows below error messages

java.lang.OutOfMemoryError: PermGen space

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

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

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

at java.net.URLClassLoader.access$100(URLClassLoader.java:71

SOLUTION:

The JVM size at the moment is 500 MB for Admin Server (including low value for PermSize & MaxPermSize), it should be in between 1Gb to 2GB.

Change the admin server jvm settings as below in setDomainEnv.sh, located under $DOAMIN_HOME/bin

if [ “${SERVER_NAME}” == “AdminServer” ] ; then

MEM_ARGS=”-Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=512m”

export MEM_ARGSfi

Note: If you are hitting the same issue “java.lang.OutOfMemoryError: PermGen space” on Managed server (WLS_Managed1) then change the managed server jvm settings as below in setDomainEnv.sh, located under $DOAMIN_HOME/bin

if [ “${SERVER_NAME}” == “WLS_Managed1″ ] ; then

MEM_ARGS=”-Xms2048m -Xmx2048m -XX:PermSize=128m -XX:MaxPermSize=512m”

export MEM_ARGS

fi

Start both Admin and Managed server.

Verify the URL: http://hostname:port/console

Now servers should be up and be running fine.

 

For more such weblogic issues and resolution click here.

Latest Weblogic Interview Questions and Answers