Just to make sure: How do you invoke the Engine? (I suppose you don't
call with a limit for rule firings.)
Unless it's a bug (BTW: your Drools version is?), it's due to one or
more of your rules.
Are you using timers? How?
A detailed investigation of the whereabouts of these
ScheduledAgendaItem objects might be done by investigating (via the
unstable API) the Agenda and its various components.
-W
On 28/05/2012, Werner Stoop <wstoop(a)gmail.com> wrote:
Hi,
We're using Drools with a StatefulKnowledgeSession to process events coming
from equipment in our network. The system draws conclusions about the state
of the equipment and writes those conclusions to a table in our
database. All our rules work as we expected and the system produces the
correct results.
However, the memory usage of the JVM steadily goes up when the system runs
for extended periods of time until we start getting OutOfMemoryExceptions
and the server has to be restarted. This is in spite of the fact that the
fact count reported by
the StatefulKnowledgeSession.getFactCount() stays reasonably stable,
with around 30 000 facts (give or take) at any point in time.
I have run the Eclipse Memory Analyzer tool (
http://www.eclipse.org/mat/)
against heap dumps from the JVM several times now, and every time it
reports more and more instances
of org.drools.common.ScheduledAgendaItem referenced from one instance of
java.lang.Object[]
To be concrete, since this morning the uptime is more than 112 hours in
total, during which the system has processed little over 2 000 000 events
from the network. It has 29 000 facts in the knowledge session, yet in the
heap dump we see 829 632 instances of
org.drools.common.ScheduledAgendaItem.
What is the ScheduledAgendaItem for? Is there something wrong with my rules
that causes this many instances to be held? Is there something I should do
to release these instances or the Object[] holding on to them?
Thanks,
Werner Stoop