<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">edson...<br>compared with previus drools versions..<br>is drools 3 more memory intensive than version 2.1?<br><br>at least on 2.5 my rules take over 250 megs..<br>with 2.1 it starts with around 100...<br><br><br><div>&nbsp;</div>Joel G. Rivera-Gonzalez<br>PRT<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Edson Tirelli &lt;tirelli@post.com&gt;<br>To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>Sent: Tuesday, January 16, 2007 4:45:57 PM<br>Subject: Re: [rules-users] Out of Memory Issue of JBoss Enginedeployed onIBMWAS 6.0.2.7<br><br><div>&nbsp;&nbsp;Dejia,<br><br>Just to explain what we are talking about: antlr is the parser generator <br>used by
 JBoss Rules. So, it generates the code to parse the DRL files. <br>One part of the parser is a DFA that tries to predict which lexer rule <br>should be used by the lexer. What you see in the stack trace, is not the <br>same class loaded hundreds of times, but it is each of the DFA and lexer <br>inner classes.<br>There is not an easy way to "control" what antlr does when generating <br>the DFA and it can indeed use huge amounts of memory as it now has a <br>variable lookahed (LL(*)). We re-wrote some lexer rules for the new <br>version to workaround and reduce DFA size and memory requirements, but <br>it is not a simple thing to do.<br><br>Ok, this is just a highlevel overview.<br>In your specific case, my recomendation is that we work together toward <br>a possible solution that may or may not require the release of a new <br>version. This is because simply upgrading the antlr version may not <br>solve the issue. It may require some grammar rule rewriting or it may
 <br>require reconfiguration of your deploy environment.<br><br>So, to start with, can you provide:<br><br>* your full stacktrace for the out of memory error?<br><br>* your hardware and software environment, specially your memory settings <br>for the jvm (in websphere it is called server if I remember correctly) <br>where you are deploying the application?<br><br>* information about the rulebase you are using? (number of rules, size <br>of the rule files, samples of rules that may be offending memory the most)<br><br>I'm asking this because we have other cases of rulebases successfully <br>deployed to WebSphere environment without memory problems, so we need to <br>check if rulebase size is the only difference between your environment <br>and other environments or if there is also issues regarding type of <br>rules you are writing that are particularly stressing the lexer.<br><br>[]s<br>Edson<br><br><br>Dejia Wang wrote:<br><br>&gt; Thanks Mark. However, with the OOM issue
 in JBoss Rules 3.0.5, we <br>&gt; cannot really use it in enterprise environment. It would be good if we <br>&gt; can get 3.0.6 out sooner.<br>&gt;<br>&gt; BTW, have your guys check in the fix? Is there anything we can help to <br>&gt; get 3.0.6 out sooner?<br>&gt;<br>&gt; Thanks- Dejia<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; *From:* Mark Proctor [mailto:mproctor@codehaus.org]<br>&gt; *Sent:* Monday, January 15, 2007 6:33 PM<br>&gt; *To:* Rules Users List<br>&gt; *Subject:* Re: [rules-users] Out of Memory Issue of JBoss <br>&gt; Enginedeployed onIBMWAS 6.0.2.7<br>&gt;<br>&gt; Antlr 2.7.7 is just for the StringTemplate stuff, we are actually <br>&gt; using Antlr 3. You could attempt to regenerate the grammar again with <br>&gt; latest versions of antlrworks and antlr, although I'm not sure if it <br>&gt; works without updates to the drl. Not sure when 3.0.6 will be out, <br>&gt; probably not for a few
 weeks.<br>&gt;<br>&gt; Mark<br>&gt; Dejia Wang wrote:<br>&gt;<br>&gt; BTW, I noticed that current stable version of antlr is 2.7.7 (released <br>&gt; November 1, 2006). Rule 3.0.5 has 2.7.6.<br>&gt;<br>&gt; Edson, will antlr 2.7.7 work?<br>&gt;<br>&gt; Thanks- Dejia<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; *From:* Dejia Wang<br>&gt; *Sent:* Monday, January 15, 2007 5:40 PM<br>&gt; *To:* 'Rules Users List'<br>&gt; *Subject:* RE: [rules-users] Out of Memory Issue of JBoss Engine <br>&gt; deployed onIBMWAS 6.0.2.7<br>&gt;<br>&gt; This is good news. Thanks very much, Mark and Edson! BTW, when will <br>&gt; 3.0.6 release be out?<br>&gt;<br>&gt; - Dejia<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; *From:* Mark Proctor [mailto:mproctor@codehaus.org]<br>&gt; *Sent:* Monday, January 15, 2007 4:33 PM<br>&gt; *To:* Rules Users List<br>&gt; *Subject:* Re:
 [rules-users] Out of Memory Issue of JBoss Engine <br>&gt; deployed onIBMWAS 6.0.2.7<br>&gt;<br>&gt; I believe this was a bug in antlr that is now fixed. I'll see if we <br>&gt; can get a 3.0.6 release done some time updated to the latest antlr. <br>&gt; Edson knows more about this, as it was a bug he investigated.<br>&gt;<br>&gt; Mark<br>&gt; Dejia Wang wrote:<br>&gt;<br>&gt; BTW, I am using the JBoss Rules 3.0.5.<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; *From:* Dejia Wang<br>&gt; *Sent:* Monday, January 15, 2007 3:56 PM<br>&gt; *To:* rules-users@lists.jboss.org &lt;mailto:rules-users@lists.jboss.org&gt;<br>&gt; *Subject:* [rules-users] Out of Memory Issue of JBoss Engine deployed <br>&gt; on IBMWAS 6.0.2.7<br>&gt; *Importance:* High<br>&gt;<br>&gt; Hi All,<br>&gt;<br>&gt; I ran into OOM (Out of Memory) issue of JBoss Rule Engine deployed on <br>&gt; IBM WAS 6.0.2.7. Below is the log<br>&gt;<br>&gt;
 …<br>&gt;<br>&gt; [Loaded org.antlr.runtime.DFA from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxx.ear/lib/antlr-3.0ea8.jar <br>&gt; &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5Cxxx.ear%5Clib%5Cantlr-3.0ea8.jar&gt;]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/antlr/runtime/DFA]<br>&gt;<br>&gt; [Preparing org/antlr/runtime/DFA]<br>&gt;<br>&gt; [Loaded org.antlr.runtime.DFA$State from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/antlr-3.0ea8.jar <br>&gt; &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cantlr-3.0ea8.jar&gt;]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/antlr/runtime/DFA$State]<br>&gt;<br>&gt; [Loaded org.drools.lang.RuleParserLexer$1 from <br>&gt;
 file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/drools-compiler-3.0.jar <br>&gt; &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cdrools-compiler-3.0.jar&gt;]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$1]<br>&gt;<br>&gt; [Loaded org.drools.lang.RuleParserLexer$2 from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>&gt; &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C&gt; <br>&gt; xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$2]<br>&gt;<br>&gt; [Loaded org.drools.lang.RuleParserLexer$3 from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>&gt;
 &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C&gt; <br>&gt; xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$3]<br>&gt;<br>&gt; [Loaded org.drools.lang.RuleParserLexer$4 from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>&gt; &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C&gt; <br>&gt; xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$4]<br>&gt;<br>&gt; ….<br>&gt;<br>&gt; [Loaded org.drools.lang.RuleParserLexer$228 from <br>&gt; file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/drools-compiler-3.0.jar <br>&gt;
 &lt;file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cdrools-compiler-3.0.jar&gt;]<br>&gt;<br>&gt; [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$228]<br>&gt;<br>&gt; …<br>&gt;<br>&gt; It looks like it loaded the same class hundreds of times until it <br>&gt; exhausts the memory.<br>&gt;<br>&gt; Any idea why this happens and how to fix this?<br>&gt;<br>&gt; Thanks- Dejia<br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt;<br>&gt;<br>&gt;------------------------------------------------------------------------<br>&gt;<br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt; <br>&gt;<br>&gt;_______________________________________________<br>&gt;<br>&gt;rules-users mailing list<br>&gt;<br>&gt;rules-users@lists.jboss.org &lt;mailto:rules-users@lists.jboss.org&gt;<br>&gt;<br>&gt;<a target="_blank"
 href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;&nbsp;&nbsp;<br>&gt;<br>&gt; <br>&gt;<br>&gt;<br>&gt;<br>&gt;------------------------------------------------------------------------<br>&gt;<br>&gt;<br>&gt; <br>&gt;<br>&gt;_______________________________________________<br>&gt;<br>&gt;rules-users mailing list<br>&gt;<br>&gt;rules-users@lists.jboss.org &lt;mailto:rules-users@lists.jboss.org&gt;<br>&gt;<br>&gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;&nbsp;&nbsp;<br>&gt;<br>&gt;------------------------------------------------------------------------<br>&gt;<br>&gt;_______________________________________________<br>&gt;rules-users mailing list<br>&gt;rules-users@lists.jboss.org<br>&gt;<a target="_blank"
 href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;&nbsp;&nbsp;<br>&gt;<br><br><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3124-6000<br> Mobile: +55 11 9218-4151<br> JBoss, a division of Red Hat @ <a target="_blank" href="http://www.jboss.com">www.jboss.com</a><br><br><br>_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></div><br></div></div></body></html>