<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> </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 <tirelli@post.com><br>To: Rules Users List <rules-users@lists.jboss.org><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> 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>> Thanks Mark. However, with the OOM issue
in JBoss Rules 3.0.5, we <br>> cannot really use it in enterprise environment. It would be good if we <br>> can get 3.0.6 out sooner.<br>><br>> BTW, have your guys check in the fix? Is there anything we can help to <br>> get 3.0.6 out sooner?<br>><br>> Thanks- Dejia<br>><br>> ------------------------------------------------------------------------<br>><br>> *From:* Mark Proctor [mailto:mproctor@codehaus.org]<br>> *Sent:* Monday, January 15, 2007 6:33 PM<br>> *To:* Rules Users List<br>> *Subject:* Re: [rules-users] Out of Memory Issue of JBoss <br>> Enginedeployed onIBMWAS 6.0.2.7<br>><br>> Antlr 2.7.7 is just for the StringTemplate stuff, we are actually <br>> using Antlr 3. You could attempt to regenerate the grammar again with <br>> latest versions of antlrworks and antlr, although I'm not sure if it <br>> works without updates to the drl. Not sure when 3.0.6 will be out, <br>> probably not for a few
weeks.<br>><br>> Mark<br>> Dejia Wang wrote:<br>><br>> BTW, I noticed that current stable version of antlr is 2.7.7 (released <br>> November 1, 2006). Rule 3.0.5 has 2.7.6.<br>><br>> Edson, will antlr 2.7.7 work?<br>><br>> Thanks- Dejia<br>><br>> ------------------------------------------------------------------------<br>><br>> *From:* Dejia Wang<br>> *Sent:* Monday, January 15, 2007 5:40 PM<br>> *To:* 'Rules Users List'<br>> *Subject:* RE: [rules-users] Out of Memory Issue of JBoss Engine <br>> deployed onIBMWAS 6.0.2.7<br>><br>> This is good news. Thanks very much, Mark and Edson! BTW, when will <br>> 3.0.6 release be out?<br>><br>> - Dejia<br>><br>> ------------------------------------------------------------------------<br>><br>> *From:* Mark Proctor [mailto:mproctor@codehaus.org]<br>> *Sent:* Monday, January 15, 2007 4:33 PM<br>> *To:* Rules Users List<br>> *Subject:* Re:
[rules-users] Out of Memory Issue of JBoss Engine <br>> deployed onIBMWAS 6.0.2.7<br>><br>> I believe this was a bug in antlr that is now fixed. I'll see if we <br>> can get a 3.0.6 release done some time updated to the latest antlr. <br>> Edson knows more about this, as it was a bug he investigated.<br>><br>> Mark<br>> Dejia Wang wrote:<br>><br>> BTW, I am using the JBoss Rules 3.0.5.<br>><br>> ------------------------------------------------------------------------<br>><br>> *From:* Dejia Wang<br>> *Sent:* Monday, January 15, 2007 3:56 PM<br>> *To:* rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org><br>> *Subject:* [rules-users] Out of Memory Issue of JBoss Engine deployed <br>> on IBMWAS 6.0.2.7<br>> *Importance:* High<br>><br>> Hi All,<br>><br>> I ran into OOM (Out of Memory) issue of JBoss Rule Engine deployed on <br>> IBM WAS 6.0.2.7. Below is the log<br>><br>>
…<br>><br>> [Loaded org.antlr.runtime.DFA from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxx.ear/lib/antlr-3.0ea8.jar <br>> <file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5Cxxx.ear%5Clib%5Cantlr-3.0ea8.jar>]<br>><br>> [Loading superclass and interfaces of org/antlr/runtime/DFA]<br>><br>> [Preparing org/antlr/runtime/DFA]<br>><br>> [Loaded org.antlr.runtime.DFA$State from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/antlr-3.0ea8.jar <br>> <file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cantlr-3.0ea8.jar>]<br>><br>> [Loading superclass and interfaces of org/antlr/runtime/DFA$State]<br>><br>> [Loaded org.drools.lang.RuleParserLexer$1 from <br>>
file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/drools-compiler-3.0.jar <br>> <file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cdrools-compiler-3.0.jar>]<br>><br>> [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$1]<br>><br>> [Loaded org.drools.lang.RuleParserLexer$2 from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>> <file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C> <br>> xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>><br>> [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$2]<br>><br>> [Loaded org.drools.lang.RuleParserLexer$3 from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>>
<file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C> <br>> xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>><br>> [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$3]<br>><br>> [Loaded org.drools.lang.RuleParserLexer$4 from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/ <br>> <file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5C> <br>> xxxApplications.ear/lib/drools-compiler-3.0.jar]<br>><br>> [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$4]<br>><br>> ….<br>><br>> [Loaded org.drools.lang.RuleParserLexer$228 from <br>> file:/D:/WebSphere/AppServer/profiles/AppSrv01/installedApps/xxxNode02Cell/xxxApplications.ear/lib/drools-compiler-3.0.jar <br>>
<file:///D:%5CWebSphere%5CAppServer%5Cprofiles%5CAppSrv01%5CinstalledApps%5CxxxNode02Cell%5CxxxApplications.ear%5Clib%5Cdrools-compiler-3.0.jar>]<br>><br>> [Loading superclass and interfaces of org/drools/lang/RuleParserLexer$228]<br>><br>> …<br>><br>> It looks like it loaded the same class hundreds of times until it <br>> exhausts the memory.<br>><br>> Any idea why this happens and how to fix this?<br>><br>> Thanks- Dejia<br>><br>> <br>><br>> <br>><br>> <br>><br>> <br>><br>> <br>><br>><br>><br>>------------------------------------------------------------------------<br>><br>><br>> <br>><br>> <br>><br>> <br>><br>> <br>><br>> <br>><br>>_______________________________________________<br>><br>>rules-users mailing list<br>><br>>rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org><br>><br>><a target="_blank"
href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>><br>> <br>><br>> <br>><br>><br>><br>>------------------------------------------------------------------------<br>><br>><br>> <br>><br>>_______________________________________________<br>><br>>rules-users mailing list<br>><br>>rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org><br>><br>><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>><br>> <br>><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>> <br>><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>