问题
We are using drools 6.3.0 and implemented our kiemodule as a deployable maven artifact (kjar). Our application uses this kiemodule and runs in Wildfly-10.
In production, newer version of the kiemodule are automatically detected and loaded in the application by a kieScanner that runs at regular intervals.
If the scanner sees a new version of the kiemodule it will load it on-the-fly and at runtime.
This is very cool functionality, but recently we discovered that every time a new ZipKieModule is loaded, the old ZipKieModule remains on the heap and is not GC'ed!
That means if we do not restart the servers AND deploy a lot of new KieModules we are susceptible to out-of-memory exceptions since each kiemodule-upgrade consumes appr. 150mb on the heap.
Can anybody point me in the right direction how to analzye why these ZipKieModukles are not gc'ed?
I attached a screenshot to this post that shows the report the Eclipse Memory Analyzer (MAT, http://www.eclipse.org/mat/downloads.php) created that clearly indicates that 6 instances of the ZipKieModule are clogging the heap and are suspects for a memory leak:
Hope anybody can help :)
来源:https://stackoverflow.com/questions/50640529/drools-6-3-0-old-zipkiemodules-remain-in-the-heap-after-upgrading-executing-sc