<p dir="ltr">Are you sure that you don&#39;t have any rule based on time and on these events? From my experience the @expire annotation doesn&#39;t work if the event could be used from some rules.</p>
<div class="gmail_quote">On 9 Feb 2013 14:26, &quot;tai-atari&quot; &lt;<a href="mailto:p00temkin@gmail.com">p00temkin@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
I&#39;m currently doing some performance tests with Drools Fusion (5.5.0) and<br>
have run into some issues with EventFactHandles which are not being garbage<br>
collected. VisualVM tells me that for every 200k inserted events, about 15k<br>
EventFactHandle objects are still left as live objects.<br>
<br>
Current setup:<br>
1) Drools 5.5.0 Final<br>
2) Oracle JVM 1.7.0_06 on Windows 7<br>
3) STREAM mode<br>
4) 1 ksession at startup<br>
5) 1 drl file with<br>
- a single sliding window &quot;over window:time(10s)&quot;<br>
- 1 entry-point<br>
- declared event class as &#39;@role( event )&#39;<br>
- only action being taken as events shows up is a println()<br>
<br>
Events are being expired (and removed) properly from the 10 second sliding<br>
window, which is verified by checking the<br>
<br>
getFactCount() from the WorkingMemoryEntryPoint. Iterating through all<br>
EventFactHandles also show that isExpired is false on all of them (and the<br>
count is correct). But even though the events are removed from the sliding<br>
window, they do not seem to be available to the GC.<br>
<br>
If dispose() is called on the ksession, garbage collection is performed<br>
properly. I get this same behavior with over &quot;window:length&quot; as well. And<br>
even without using sliding windows at all unless I specifically add a<br>
&quot;@expires ( 1s )&quot; to the event class declaration.<br>
<br>
Has anyone else seen this behavior? After a couple of million events the<br>
memory consumption becomes a pain and the only recovery action which seems<br>
to be available is to dispose the ksession and start over. This means state<br>
is lost and it requires the application to save and reinsert all facts to<br>
the ksession, then start adding events again.<br>
<br>
Any help on how to troubleshoot this further would be really appreciated.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Garbage-collection-and-sliding-windows-Drools-5-5-0-Final-tp4022183.html" target="_blank">http://drools.46999.n3.nabble.com/Garbage-collection-and-sliding-windows-Drools-5-5-0-Final-tp4022183.html</a><br>

Sent from the Drools: User forum 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>
</blockquote></div>