I would like just to add a little remark.
I took the default drools project in eclipse for version 3.0.6 and 4.0.2 and modified it to call 500000 times the ruleBase.
Indeed, there is a memory leak. But not only, if you use jconsole and jmx on the JVM, whith drolls 3.0.6 the number of loaded classes increases the first time you call drools and then it satys stable.
In drools 4.0.2, in statefull session, the numbre of loaded classes goes up to 32000 and the jvm  blocks. You just have todisable shadow facts and it works better but still blocks the jvm (I do a working memory dispose).
Now in drools 4.0.2 with shadow facts disable, the same example with stateless session, the numbre of loaded classes goes up much slower but still evry time you call the execute, new classes are loaded.
Why in version 3.0.6, calling the working memory and asserting new facts creates new classes for once and in 4.0.2, I have the impression that new classes are created and loaded each time event if the classes represeting the facts are the same. But in stateless, they are then unloaded
It is a problem. We developpe for a retail customer a loyalty system with drools and in performance tests drools 4.0.2 is a little better but the loading/unloading classes uses a lot of CPU power. Our server is multi-threaded and use one singleton for the RuleBase and when needed, a new working memory (or session) is created.
And also; in drools 3.0.6, it was only possible to use the serial and parallel Garbage collector and not the concurent one (it was not possible to load all rules and the in the middle there were syntax errors in drl that never happened before).
in drools 4.0.2, now every thing works. Were there modification on this subject or not ?
Nicolas Heron

-------- Message d'origine--------
De: rules-users-bounces@lists.jboss.org de la part de Mark Proctor
Date: mer. 17/10/2007 12:23
: Rules Users List; Rules Dev List
Objet : [rules-users] memory leak in 4.0.2

For stateful sessions a memory leak has been found, and fixed, for 4.0.2

We will release 4.0.3 early next week that address this issue. Stateless
sessions are not affected, but if you are using stateful with lots
sessions on the same rulebase then its recommended you stay with 4.0.1
until we release 4.0.3 next week.

rules-users mailing list