Thursday, July 30, 2015

bsu.sh: java.lang.OutOfMemoryError: GC overhead limit exceeded

Version:

Oracle Weblogic server 10.3.6 in OEL 64 bit

Issue:

July 2015 PSU (WLS PATCH SET UPDATE 10.3.6.0.12) on weblogic server is failing with "OutOfMemoryError". Patching is failing immediately after it is invoked.

Error:

[oracle@soahost1 bsu]$ ./bsu.sh -install -patch_download_dir=/home/oracle/middleware/utils/bsu/cache_dir -patchlist=EJUW -prod_dir=/home/oracle/middleware/wlserver_10.3

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:448)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
        at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
        at com.bea.plateng.patch.Patch.main(Patch.java:281)

Reason:

The default java memory arguments  provided in bsu.sh file are not sufficient

Solution:

Increase the Java memory values in bsu.sh file (under $MW_HOME/utils/bsu) by adjusting the valuMEM_ARGS values.

By default the values will be
MEM_ARGS="-Xms256m -Xmx512m"

I increased it to 1024-1024 as follows
"-Xms1024m -Xmx1024m"

Save the bsu.sh file and re-execute the patching command.

6 comments:

  1. can we pass this arguments in command line?

    ReplyDelete
  2. thanks it worked =)

    ReplyDelete
  3. faced this error after increasing


    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Timer-0"
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    ReplyDelete