Drools 6.3.0: Old ZiPKieModules remain in the heap after upgrading (executing scanNow in kiescanner JMX bean)

跟風遠走 提交于 2020-04-30 08:11:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!