<div><br></div> Thanks for the feedback!<div><br></div><div> Edson<br><br><div class="gmail_quote">2010/7/29 dmiller44 <span dir="ltr"><<a href="mailto:dmiller@versatile.com">dmiller@versatile.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Edson,<br>
<br>
Sorry - we just solved this. The leak isn't in Drools (which I suspected it<br>
might not be) but was in fact with java.util.concurrent.<br>
LinkedBlockingQueue. We were running JDK 6 Update 16 - which apparently<br>
suffers from the issue described in this ticket:<br>
<a href="http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=468c6d6197d54781dd3fb3bb3dc4c?bug_id=6806875" target="_blank">http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=468c6d6197d54781dd3fb3bb3dc4c?bug_id=6806875</a><br>
Bug ID 6806875<br>
<br>
Once upgrading the JDK to Update 20, the problem went away. Now we're<br>
seeing the performance from Drools that we have had prior to this issue :)<br>
<br>
Sorry to trouble all of you with this - hopefully if someone has similar<br>
issues, the JDK upgrade will solve it for them as well.<br>
<br>
Dan<br>
<div><div></div><div class="h5"><br>
<br>
Edson Tirelli-3 wrote:<br>
><br>
> Dan,<br>
><br>
> I am not aware of any memory leak in CR1. If you can provide me with<br>
> a<br>
> test case I will investigate this today. Please open a JIRA, attach your<br>
> test case and let me know. If there is a leak, I need to fix it before<br>
> final<br>
> release.<br>
><br>
> And it is not a problem to instantiate objects in a rule's<br>
> consequence.<br>
> That is "business as usual".<br>
><br>
> Thanks,<br>
> Edson<br>
><br>
> 2010/7/28 dmiller44 <<a href="mailto:dmiller@versatile.com">dmiller@versatile.com</a>><br>
><br>
>><br>
>> Hello,<br>
>><br>
>> I have a weird issue, and I'm trying to figure out if this is a bug I<br>
>> should<br>
>> report, or an error in my rule. I'm running an application with a heap<br>
>> space (min: 512mb, max: 1024mb) that gets full and eventually overflows<br>
>> relatively quickly (12hrs or less). We insert about 112 records into a<br>
>> Stateful Drools Session (Drools 5.1 CR1 released 7/22/2010) every<br>
>> 30seconds,<br>
>> using CLOUD session type, single thread, with fireUntilHalt.<br>
>><br>
>> Our rules evaluate the object (A) we give it, and in some cases<br>
>> instantiate<br>
>> a new object (B) and insert it into the session. After processing object<br>
>> (A), we retract it from the session.<br>
>><br>
>> Another rule matches on object (B), and when finished, also retracts the<br>
>> object.<br>
>><br>
>> When I do a heap snapshot, I've noticed quite a few Drools-related<br>
>> classes,<br>
>> along with unreleased instantiations of object(A) & object(B) (more of<br>
>> the<br>
>> latter). Obviously I have to take into consideration that objects are<br>
>> being<br>
>> inserted at the time of the snapshot, but over a couple hours I'll have<br>
>> 1000's of these objects. I've found the only fix to be to release the<br>
>> session.<br>
>><br>
>> I should note - calling session.getObjects() shows an empty list (size<br>
>> 0).<br>
>><br>
>> Is this a bug? When retract is called, shouldn't it free up the<br>
>> FactHandle<br>
>> &<br>
>> Object to be collected? And is instantiating an object in a rule<br>
>> incorrect<br>
>> for some reason?<br>
>><br>
>> Below is a small chart of classes - the number of instances - and space<br>
>> taken. (TemperatureEvent represents object (A), while AssetShallowRemote<br>
>> represents object (B)) Any input would be appreciated.<br>
>><br>
>> Dan<br>
>><br>
>><br>
>> | Class |<br>
>> Instances<br>
>> |<br>
>> Size | |<br>
>><br>
>> |--------------------------------------------------------------+-----------+----------+---|<br>
>> | java.lang.String |<br>
>> 1155258<br>
>> |<br>
>> 41589288 | |<br>
>> | char[] |<br>
>> 1153540<br>
>> |<br>
>> 91560120 | |<br>
>> | java.util.concurrent.LinkedBlockingQueue$Node |<br>
>> 329989<br>
>> |<br>
>> 10559648 | |<br>
>> | java.util.LinkedHashMap$Entry |<br>
>> 153489<br>
>> |<br>
>> 9209340 | |<br>
>> | java.util.HashMap$Entry |<br>
>> 151929<br>
>> |<br>
>> 6684876 | |<br>
>> | java.sql.Timestamp |<br>
>> 117017<br>
>> |<br>
>> 4212612 | |<br>
>> | org.drools.reteoo.LeftTuple |<br>
>> 53395<br>
>> |<br>
>> 8756780 | |<br>
>> | org.drools.common.AgendaItem |<br>
>> 53390<br>
>> |<br>
>> 5819510 | |<br>
>> | org.drools.retoo.RightTuple |<br>
>> 53386<br>
>> |<br>
>> 5125056 | |<br>
>> | my.test.package.AssetShallowRemote | 42995 | 11780630 | |<br>
>> | org.drools.common.DefaultFactHandle |<br>
>> 37273<br>
>> |<br>
>> 3280024 | |<br>
>> | org.drools.core.util.ObjectHashSet$ObjectEntry |<br>
>> 37273<br>
>> |<br>
>> 1341828 | |<br>
>> | org.drools.common.PropagationContextImpl |<br>
>> 32721<br>
>> |<br>
>> 2683512 | |<br>
>> | org.drools.core.util.ObjectHashMap$ObjectEntry |<br>
>> 32721<br>
>> |<br>
>> 1639924 | |<br>
>> | my.test.package.TemperatureEvent | 7165 |<br>
>> 917120 | |<br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Objects-not-released-from-heap-tp1002541p1002541.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Objects-not-released-from-heap-tp1002541p1002541.html</a><br>
>> Sent from the Drools - User mailing list archive at Nabble.com.<br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>> <a href="mailto:rules-users@lists.jboss.org">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>
>><br>
><br>
><br>
><br>
> --<br>
> Edson Tirelli<br>
> JBoss Drools Core Development<br>
> JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
><br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="mailto:rules-users@lists.jboss.org">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>
><br>
><br>
--<br>
</div></div>View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Objects-not-released-from-heap-tp1002541p1007840.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Objects-not-released-from-heap-tp1002541p1007840.html</a><br>
<div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>