-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
7.56.0.Final
-
None
-
2021 Week 43-45 (from Oct 25)
-
NEW
-
NEW
We are using drools in one of our batch jobs where this a different set of rules submitted for each job. We are facing a incremental growth in ram after each run. Is there a way to dispose the rules in KieBase after each run as they wont be required for the next job.
Our code to read the rule file(Before each batch job and create container is as follows :
private static KieFileSystem getKieFileSystem(String rulesFileName,String tenant,String filePath) throws Exception
public static KieContainer getKieContainer(String rulesFileName, String tenant, String filePath) throws Exception
{ KieBuilder kb = kieServices.newKieBuilder(getKieFileSystem(rulesFileName,tenant,filePath)); kb.buildAll(); KieModule kieModule = kb.getKieModule(); KieContainer kContainer = kieServices.newKieContainer(kieModule.getReleaseId()); return kContainer; }Code we tried to remove the rules from memory after each batch job (None of it worked) :
- KieFileSystem.delete(filePath+tenant+"//"rulesFileName""); // Removes file but rules stay in ram
- kieServices.getRepository().removeModule(kContainer. getReleaseId()); // removes module from repository but rules stay in memory still
- kiesession.dispose() and kieContainer.dispose() // Rules stay in memory still
Any help regarding this would be great.