[rules-users] java.lang.OutOfMemoryError: Java heap space

Wolfgang Laun wolfgang.laun at gmail.com
Wed Oct 10 03:28:16 EDT 2012


Just repeat this, as often as required, with as many facts in "facts"
as you want:

// copy-pasted from the API documentation ;-)
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
 for( Object fact : facts ) {
     ksession.insert( fact );
 }
 ksession.fireAllRules();
 ksession.dispose();

-W


On 09/10/2012, Brenda1636 <brenda.chodkowski at ctg.com> wrote:
> I've seen many posts about users receiving a "java.lang.OutOfMemoryError:
> Java heap space" error. The answer have been to increase heap space. I was
> wondering if there is another way around this.
>
> I have about 10,000 facts that I want to bring into working memory. Is
> there
> a way to insert some of them, run the rules, remove the inserted ones, and
> then insert more?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4020185.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list