How to release java heap memory by using Shenandoah GC/ How to use Shenandoah variable in Agent bat file to release java heap

How to release java heap memory by using Shenandoah GC/ How to use Shenandoah variable in Agent bat file to release java heap

Issue:
How to free java memory by using Shenandoah GC/ How to use Shenandoah variable in Agent bat file

Resolution:

Add below statement to Agent startup.bat and check if memory is getting released after workflow execution:

 

 

set SHENANDOH_GC_OPTIONS=-XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahUncommitDelay=1000 -XX:ShenandoahGuaranteedGCInterval=10000

 

And Change Below Command

 

%START_OPTIONS% %JAVACMD% %JAVA_OPTS% -XX:MaxMetaspaceSize=128m -Xss1m -Xms1024m -Xmx2048m -classpath %CLASSPATH% -Daeagent.home="%BASEDIR%" -Dapp.name="aeagent" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" -Duser.dir="%BASEDIR%" com.automationedge.aeagent.AgentMain %CMD_LINE_ARGS%

 

To

 

%START_OPTIONS% %JAVACMD% %JAVA_OPTS% %SHENANDOH_GC_OPTIONS% -XX:MaxMetaspaceSize=128m -Xss1m -Xms1024m -Xmx2048m -classpath %CLASSPATH% -Daeagent.home="%BASEDIR%" -Dapp.name="aeagent" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" -Duser.dir="%BASEDIR%" com.automationedge.aeagent.AgentMain %CMD_LINE_ARGS%

 

 

The batch File should look like as below:







Restart the agent after doing this change, also you can ask customer to add these settings in one the Agents observe the behavior and if it is working fine these changes can be done in all other agents.


NOTE: This issue has been fixed in AE 7.3.1v and hence in subsequent version also.

      Links to better reach 

            Bot Store

             EPD