[rules-users] Re: BRMS Server - memory Issue while execution - Critical

Arjun Dhar dhar_ar at yahoo.com
Fri Jul 20 17:01:32 EDT 2007


> Stateless sessions should not hold onto any references. Stateful do,
> and dispose() must be called when its finished - otherwise the rulebase
> holds a reference forever. If the rulebase is holding onto stateless
> sessions, then that is a bug.
> Mark
> 

Thanks a lot Mark,
 taking the latest binary passed the load testing one a single thread atleast. 
Though I need to confirm due to removal of "modify()" none of the functionality 
has got altered. It chokes a little in the middle but is not going out of 
memory so I guess the leak is really fixed.

One last question on this:
On the Build 4MR2, I disposed the session and created a new one from the cached 
RuleBase and it took the load (on the code that had the memory leak)

So what approach is conceptually better; Keep the same statless session for 
ever or for each execution request use a new one?? I talking pure 
performance/memory?!?!

I remember you saying creating sessions is cheap; so if I have a million 
requests and for each one I create a new session is it still cheap? or a single 
stateless session servicing the requests is better?
Typical Application: telephone exchange; where numbers are bombarding the 
engine. For each incomming request I'd assume a single session would be the 
most optimal solution as long as the rules are common. Right?!

I'm wondering if I should also maintain an image, object = {RuleBase + Globals} 
so I can create a session. but I think this would have a huge performance cost 
to create new sessions per request. Right?

Thanks for the Fix, its  life saver!


Thanks,
Arjun






More information about the rules-users mailing list