Saturday, January 9, 2010

Error Starting Weblogic Admin Server: Could not reserve enough space for object heap

The first time that I run my weblogic admin server after installing and configuring oracle soa in weblogic 10.3.2, I encountered the following error:
Could not reserve enough space for object heap.
Could not create the Java virtual machine.

I resolved this by creating a new environment variable called EXTRA_JAVA_PROPERTIES with the following value "-Xms512m -Xmx512m".
From the JDeveloper 11g Release Notes:
Running applications with limited free memory (7343786)

Under certain circumstances, if you do not have enough free memory available, you may receive an error when running an application:

Error occurred during initialization of VM
Could not reserve enough space for object heap

Normally you would resolve this by adding -Xms and -Xmx arguments to the project's Run/Debug profile. However, there are existing entries for these settings in the WebLogic startup that will override the project's settings. The proper way to resolve this error is to add EXTRA_JAVA_PROPERTIES to your environment, as follows:

On Linux
setenv EXTRA_JAVA_PROPERTIES "-Xms512m -Xmx512m"

On Windows
set EXTRA_JAVA_PROPERTIES="-Xms512m -Xmx512m"

Important update to this post!

"-Xmx512" is not sufficient to run and test an application in a SOA server, because it would be incredibly slow. If you encounter the above issue using the default config of "-Xmx1024m", then try to decrease the number until it will work. There is no hard rule, you could try "-Xmx1000m" for instance. If it still doesn't work, then try decreasing the number again.

12 comments:

  1. Hey Thanks Man.. I was facing the same issue in Windows7..now its resloved !!!

    ReplyDelete
  2. Worked for me too, but in Windows you MUST NOT use the double quotes.

    ReplyDelete
  3. This was very helpfull. Thanks!!!!

    ReplyDelete
  4. Thanks It resolved the issue for me too.

    ReplyDelete
  5. Hi guys,
    Please note of my important update to this post above.

    Regards,
    Pino

    ReplyDelete
  6. Excellent Post.. This helped me alot... Thanks...

    ReplyDelete
  7. thank you so much ..this really helped me

    ReplyDelete
  8. Wooow gr8 Job, this worked for me..

    ReplyDelete