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

Michael Neale michael.neale at gmail.com
Fri Jul 20 23:06:29 EDT 2007


Hi Arjun - I wouldn't recommend re-using session unless there is some
expensive state you wish to reuse. Pooling them will use up far more
resources then freeing them. You should only pool expensive to obtain
resources.

On 7/21/07, Arjun Dhar <dhar_ar at yahoo.com> wrote:
>
> > 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
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070721/e337e79b/attachment.html 


More information about the rules-users mailing list