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: