运行WODM时出现内存问题(JRULES)

时间:2017-12-26 05:29:27

标签: out-of-memory ilog jrules ibm-odm

我正在创建一个ruleApp并将其部署到Rule Execution服务器中。在执行规则时,它开始抛出OutOfMemory错误。

000000bd execution     E   The interaction ruleEngine.execute has failed.
                                 com.ibm.rules.res.xu.internal.LocalizedResourceException: GBRXU0001E: The interaction ruleEngine.execute has failed.
        at com.ibm.rules.res.xu.client.internal.jca.XUInteraction.execute(XUInteraction.java:302)
        at com.ibm.rules.res.xu.client.internal.XUSession.executeOperation(XUSession.java:171)
        at com.ibm.rules.res.xu.client.internal.XURuleEngineSession.execute(XURuleEngineSession.java:603)
        at ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:725)
        at ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:714)
        at ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:625)
        at ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:269)
        at ilog.rules.res.session.impl.IlrStatefulSessionBase.execute(IlrStatefulSessionBase.java:241)
        at ilog.rules.res.session.impl.IlrStatelessSessionBase.execute(IlrStatelessSessionBase.java:63)
        at com.bnsf.rules.services.framework.RuleExecutioner.invokeRuleService(RuTioner.java:50)
        at com.bnsf.rules.services.framework.RuleExecutioner.invokeSimpleRuleService(RuTioner.java:24)
        at com.bnsf.rules.services.MiscBillingRuleService.execBatch(Miservice.java:222)
        at com.bnsf.rules.services.MiscBillingRuleService.performTask(MisService.java:158)
        at com.bnsf.rules.services.MiscBillingRuleService.execute(MisService.java:88)
        at com.bnsf.rules.services.MiscBillingRuleServiceThread.run(MisThread.java:60)
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:338)
        at java.lang.StringBuffer.append(StringBuffer.java:204)
        at java.io.StringWriter.write(StringWriter.java:113)
        at java.io.StringWriter.append(StringWriter.java:155)
        at com.ibm.rules.res.xu.engine.de.internal.DEManager.note(DEManager.java:554)
        at com.ibm.rules.engine.runtime.impl.EngineObserverManager.note(EngineObserverManager.java:84)
        at com.ibm.rules.engine.rete.runtime.AbstractReteEngine.note(AbstractReteEngine.java:686)
       at com.ibm.rules.generated.EngineDataClass.ilog_rules_brl_System_printMessage_java_lang_String(Unknown Source)
        at com.ibm.rules.generated.ruleflow.Service$0020Definition.IntermediateDefnFlow$003eIntermediate$0020Event$0020Definition.BodyExecEnv.executeIntermediate$0020Events$0020For$0020Intra$002dplant$0020Switch$002dEndEventBody3(Unknown Source)
        at com.ibm.rules.generated.ruleflow.Service$0020Definition.IntermediateDefnFlow$003eIntermediate$0020Event$0020Definition.BodyExecEnv.executeB

我在每个规则中使用print语句,错误意味着print语句填满了我的应用程序的堆内存。此外,错误消息显示规则集中的特定包。仅从该包中删除print语句将解决此问题。

1 个答案:

答案 0 :(得分:0)

可能是Java堆太小而无法运行您的应用程序,但此错误的典型原因是规则中的无限循环。您(或管理员)可以验证WebSphere配置选项是否指定了合理的堆大小。

另一种可能性是其他应用程序正在使用所有堆空间 - 我当前的组织必须每周重新启动他们的开发服务器,以便从他们尚未找到的内存泄漏中恢复堆空间。在这种情况下,规则执行得很好,但是当在RES中的Decision Warehouse中查看(大)决策跟踪时,有时会出现堆空间错误。