java.lang.OutOfMemoryError: GC overhead limit exceeded in ServiceMix

234 views
Skip to first unread message

francesca p.

unread,
Feb 14, 2017, 4:21:19 AM2/14/17
to Drools Usage

Hello everybody, I have some problem with Drools and the execution of rules :

 

To let you better understand, I’ll explain my goal :

I must elaborate something like 3.000-10.000 elements (received as file text). This elements have 3 fields : start time, end time and an orientation (left or right) . Then I do some controls on them for avoid overlapping, for planning an action for change the orientation if there are two nearby elements with different orientation, etc etc.

When I’m working on Eclipse it’s all ok, to process 6000 it takes 60s, but when I put the jar into ServiceMix (I'm using Drools as library because ServiceMix doesn't support lastest version of Drools -6.5.0-Final) it give me the following error :

 

Exception in thread "ActiveMQ Broker[amq-broker] Scheduler" java.lang.OutOfMemoryError: GC overhead limit exceeded

        at org.drools.core.reteoo.NotNode.createLeftTuple(NotNode.java:121)

        at org.drools.core.phreak.PhreakJoinNode.insertChildLeftTuple(PhreakJoinNode.java:485)

        at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:115)

        at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:76)

        at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:519)

        at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:505)

        at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341)

        at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301)

        at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136)

        at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:94)

        at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)

        at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:73)

        at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:970)

        at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1312)

        at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1251)

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1359)

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1350)

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1331)

        at com.sample.Drools.DroolsAcquisitionList.fireAllRules(DroolsAcquisitionList.java:146)

        at com.nais.spla.brm.main.Messages.SerializedPRListMessage.processMessage(SerializedPRListMessage.java:84)

        at com.nais.spla.brm.main.BusinessRulesManager.parseMessage(BusinessRulesManager.java:312)

        at com.nais.spla.brm.main.BusinessRulesManager.onMessage(BusinessRulesManager.java:281)

        at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1403)

        at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)

        at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)

        at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)

        at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)

java.lang.OutOfMemoryError: GC overhead limit exceeded

        at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68)

        at java.lang.StringBuilder.<init>(StringBuilder.java:89)

        at org.apache.activemq.command.ActiveMQDestination.getQualifiedName(ActiveMQDestination.java:226)

        at org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:917)

        at org.apache.activemq.broker.region.Queue.access$100(Queue.java:103)

        at org.apache.activemq.broker.region.Queue$2.run(Queue.java:146)

        at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)

        at java.util.TimerThread.mainLoop(Timer.java:555)

        at java.util.TimerThread.run(Timer.java:505)

 

 

I have tried to enlarge the java memory on the file of configuration servicemix.bat , without success .

 

Someone have the same problem ?

I know that I can improve my rules, but why in Eclipse all works correctly and in ServiceMix not?

francesca p.

unread,
Feb 14, 2017, 4:23:37 AM2/14/17
to Drools Usage
Ps : I forgot to write thanks in advance for your help ! =)
Reply all
Reply to author
Forward
0 new messages