We will fix java.lang.OutOfMemoryError: GC overhead limit exceeded. Facing this error while applying bsu patches. We can resolve it by increasing memory size as below.
How to fix java.lang.OutOfMemoryError.
Error:-
While trying to apply the BSU patch, facing below error.
$./bsu.sh -install -patch_download_dir=$FMW_HOME/utils/bsu/cache_dir -patchlist=KRDE -prod_dir=/data01/apps1225/fs1/FMW_Home/wlserver_10.3
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.HashMap.createEntry(HashMap.java:897)
at java.util.HashMap.addEntry(HashMap.java:884)
at java.util.HashMap.put(HashMap.java:505)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.<init>(XBeanDataHandler.java:99)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)
at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)
at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)
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)
Solution: –
Follow these steps to resolve the issue:
A.==>Go to $FMW_Home/utils/bsu.
B.==>Edit bsu.sh (for UNIX) or bsu.cmd (for Windows).
C.==>Here you will find the following: MEM_ARGS=”-Xms256m -Xmx512m”
D.==>Increase these values as needed: for example, to “-Xms2048m -Xmx2048m”.