This post covers issue encountered during Startup of Oracle Fusion Middleware component “Weblogic Server”(This issue/fix is also applicable to any other Fusion Middleware product like WebCenter, OBIEE, ODI etc). If you are new to Oracle SOA Fusion Middleware then I highly recommend checking Atul’s Post about Oracle SOA/BPM 12c Architecture Every Apps DBA Must Know
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)
JVM & PermGen:
- JVM stands for Java Virtual Machine and is an area in Memory divided in 5 parts, Heap, Method (non heap), JVM Stack, Native Stack, PC Registers
- Each Managed Server or Admin Server in WebLogic represents a JVM.
- PermGen is part of Method (non-heap) stores class related data from class definitions, structures, methods, field, method (data and code) and constants.
- If this area runs out of space then you get an error like java.lang.OutOfMemoryError: PermGen space
- This area can be regulated using -XX:PermSize and -XX:MaxPermSize
- PermGen in Java 8 is replaced by MetaSpace
For further reading on JVM and Memory Structure check here
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.
1. Ensure your both servers (AdminServer and Managed server) are not running. Check with below commands
netstat -an | grep 7001 (AdminServer port)
netstat -an | grep 7011 (WLS_Managed1 (managed server) port)
2. Change the admin server jvm settings as below in setDomainEnv.sh, located under $DOAMIN_HOME/bin
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
3. Start both Admin and Managed server
4. Verify the URL: http://hostname:port/console
Now servers should be up and be running fine
Have queries? Why wait, Post in the comment section below?
Are you planning to Learn WebLogic Server or would like to check some of the common Oracle WebLogic Interview Questions then get the from here (sent over email)