SOA : WebLogic startup Out Of Memory Errors


While starting the WebLogic SOA Server you might see the following error sometimes.

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


There are two ways to resolve this error.
1) Reduce the MaxPermSize if you don’t have enough RAM(less than 4GB) or if you are running a 32-bit OS.
2) Use a 64-bit JDK if you have enough RAM(more than 4GB) and a 64-bit OS.

 

1) Reduce MaxPermSize.

Got to the following location:
<mw_home>\user_projects\domains\<domain_name>\bin
mw_home : Folder where all the SOA Components like WebLogic are installed.
domain_name : The name of the domain created while installing SOA.

Edit setSOADomainEnv.cmd
 
Find the following line :
set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m

Reduce the MaxPermSize to something small say 512m.

Now the changed line should look like.

set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=512m

Now start the server.


 

2) Use 64-bit JDK

If you have a 64-bit OS you can use a 64-bit JDK.

Download and install the 64-bit JDK(Windows x64) from here.

Got to the following location:

<mw_home>\user_projects\domains\<domain_name>\bin
mw_home : Folder where all the SOA Components like WebLogic are installed.
domain_name : The name of the domain created while installing SOA.

Edit setDomainEnv.cmd

Find the following line :

set JAVA_HOME=%JAVA_HOME%

Change it to point to the 64-bit JDK.

It should look like this

set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_43

Now start the server.

1 comments:

I had the same problem with my local environment, So i changed the values of setDomainEnv.cmd. This worked for me for some time and again had the same problem.
I solved this task reinstating the local environment, changing the default of my jdk this path : C:\Oracle_home\Middleware\jdk160_29 to this path : C:\JRockit\jrockit-jdk1.6.0_33-R28.2.4-4.1.0 this depends of the path where you have installed the jdk in you local machine.

Reply

Post a Comment