<div dir="ltr">Ok, so I reviewed my code again and found a spot where I am queuing up tasks to process data that hadn&#39;t been loaded.  My application shouldn&#39;t spawn a rule sessions in the case.  I have also moved to a sever with less RAM and will begin profiling as soon as possible.   Here is where I stand as of now:<div>
<br></div><div>1) I am still seeing about 250 million JoinNodeLeftTuples (eats up about 30GB of RAM).  This greatly outnumbers anything else in the system by a factor of 100x.</div><div style>2) Creating a test case will be very difficult as I cannot pinpoint the root cause of this issue.  I am not sure if it is related to too many rules engine, the size of my ruleset, or simply the scale at which I am attempting to use Drools.  If I pinpoint an actual memory leak, I will create a test case and submit.</div>
<div style>3) I cannot use a StatelessKnowledgeSession as it locks my process up.  It seems the code in StatelessKnowledgeSessionImpl&#39;s constructor creates a lock that never releases.  No idea on this either for now.</div>
<div style><br></div><div style><div>            this.ruleBase.lock();</div><div>            try {</div><div>                if ( ruleBase.getConfiguration().isSequential() ) {</div><div>                    this.ruleBase.getReteooBuilder().order();</div>
<div>                }</div><div>            } finally {</div><div><b>                this.ruleBase.unlock();   &lt;--- This line is never reached for some reason</b></div><div>            }</div><div> </div><div style>I will continue trying to find a root cause or path forward and report back.  If anything here gives you all a sense of some wrongdoing on my behalf, please let me know.  I don&#39;t fully understand sequential mode as the documentation is not approachable from my uninformed perspective.  So perhaps there is something I am doing in my rules that leads to this lock not getting release?</div>
<div style><br></div><div style>Thanks again,</div><div style>Julian</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 9:13 AM, Julian Klein <span dir="ltr">&lt;<a href="mailto:julianklein@gmail.com" target="_blank">julianklein@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Unfortunately the server I was using locked up last night and I cannot get access.  I&#39;ll have to find an interim system where I can run tests and profile the heap.  In the meantime, I switched to a Sequential Stateless Session.  I don&#39;t know the internals of Drools, but since this seems to turn off the left input propagation, does that mean the JoinLeftNode is not used?</div>
<div><br></div><div>I am running 5.4 .0 on Linux.  If I see the same issues with a stateless approach, I will try the 5.5 approach.</div><div><br></div><div>Thanks again,</div><div>Julian<div><div class="h5"><br><br>On Feb 17, 2013, at 6:19 PM, Mark Proctor &lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt; wrote:<br>
<br></div></div></div><div><div class="h5"><blockquote type="cite"><div>You&#39;ll need to help us a bit here, by creating a test of some sort. &quot;I have 100 rules with 1B JoinLeftNode&quot; doesn&#39;t give us much to go on.<div>
<br></div><div>The problem mentioned earlier was related to windows, which I don&#39;t think you are using - or you&#39;d have said so.</div><div><br></div><div>Also can you tell us what version you are using? Could you maybe try the 5..5.x branch which has a lot of fixes in it (you&#39;ll need to build it with maven):</div>
<div><a href="https://github.com/droolsjbpm/drools/tree/5.5.x" target="_blank">https://github.com/droolsjbpm/drools/tree/5.5.x</a></div><div><br></div><div>mark<br><div><div>On 17 Feb 2013, at 18:27, Julian Klein &lt;<a href="mailto:julianklein@gmail.com" target="_blank">julianklein@gmail.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Thanks again. I have tried Sequential mode, but somehow my Java based class that I use for function calls no longer receives them.  Perhaps there is an error occurring before the call to my class in the &quot;then&quot; section of the rule that is not presenting itself in my logs.  Either that or I don&#39;t understand sequential mode&#39;s limitations well enough.  I&#39;ll try it one more time and report back on that as well.</div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Feb 17, 2013 at 1:17 PM, Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com" target="_blank">wolfgang.laun@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 17/02/2013, Julian Klein &lt;<a href="mailto:julianklein@gmail.com" target="_blank">julianklein@gmail.com</a>&gt; wrote:<br>


</div><div>&gt; Ok, I witnessed this with JProfiler.  I will try with jmap to make sure and<br>
&gt; report back later today or tomorrow.   Is it safe then to assume that<br>
&gt; discarding (dispose) the session between laps is better from a throughput<br>
&gt; perspective than re-using it?<br>
<br>
</div>If you need to start each session with a clean slate: yes, dispose is<br>
preferable.<br>
<div><br>
&gt;  Also, would using a Stateless Session<br>
&gt; &quot;perform&quot; better from either a memory or CPU perspective?<br>
<br>
</div>Only if you can run it in &quot;sequential mode&quot; - see Expert, 3.3.7.1.<br>
Sequential Mode<br>
<br>
-W<br>
<br>
&gt;<br>
&gt; Thanks again!<br>
<div><div>&gt;<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>
</div><br></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rules-users mailing list</span><br><span><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a></span><br>
<span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></span></div></blockquote></div></div></div></blockquote></div><br></div>