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

Wolfgang Laun wolfgang.laun at gmail.com
Wed Oct 10 03:42:13 EDT 2012


On 10/10/2012, Mahadevappa, Shobha <Shobha.Mahadevappa at nttdata.com> wrote:
> Is there anything that has to be taken care in case of a stateless session.
> I have a huge collection of facts that needs to get into the working memory
> and I fire ksession.execute(<Collecton object>);

That'll do - it calls dispose for you.
-W

>
>
>
> Regards,
> Shobha M | Senior Program Manager, A&AD | NTT DATA Global Delivery Services
> Limited| w. +91-80-26659482 (Ext 3679) | v. 8814.3679 | m. +91.9972522743 |
> shobha.mahadevappa at nttdata.com
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Wolfgang Laun
> Sent: 10 October 2012 PM 12:58
> To: Rules Users List
> Subject: Re: [rules-users] java.lang.OutOfMemoryError: Java heap space
>
> 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
>>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> ______________________________________________________________________
> Disclaimer:This email and any attachments are sent in strictest confidence
> for the sole use of the addressee and may contain legally privileged,
> confidential, and proprietary data.  If you are not the intended recipient,
> please advise the sender by replying promptly to this email and then delete
> and destroy this email and any attachments without any further use, copying
> or forwarding
>
> _______________________________________________
> 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