Drools Guvnor 5.0.1 - Memory Usage Tuning
by tdakanalis
Hi,
We're using Drools Guvnor 5.0.1 in a production environment, running on
Tomcat 6. We're experiencing permgen issues, particularly when doing large
imports of rules, archiving, or compilation of rules.
Following permgen exceptions, we increased the permgen to :
-XX:MaxPermSize=2048M -ms3192M -mx3192M.
This sustained us for a while, but our assets are ever growing, and again
we're exceeding the permgen space allocated. Can someone recommend
appropriate settings/configuration in order to reduce the memory/cpu usage?
Assets in Guvnor:
~ 21K rules in 11 decision tables (.xls) in 1 package
Thanks,
Themistoklis Dakanalis
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-5-0-1-Memory-Usage-Tuning...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Getting java.lang.ClassCastException: - using Drools 5.3
by kashif10
HI.
I am getting following exception.
Exception in thread "main" org.drools.RuntimeDroolsException:
d1.rule.Rule_8f09c0aa350100000080cb1e0dd40f6fEval4Invoker@f6f66af4 :*
java.lang.ClassCastException: d1.rule.facts.Medication cannot be cast to
d1.rule.facts.Procedure*
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:119)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:178)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:197)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:72)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:161)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:458)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:386)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:215)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:845)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at d1.rule.facts.PatientFacts.loadFactsInSession(PatientFacts.java:6075)
at d1.rule.DREvaluator.startEvaluation(DREvaluator.java:278)
at d1.rule.DREvaluator.main(DREvaluator.java:72)
Caused by: java.lang.ClassCastException: d1.rule.facts.Medication cannot be
cast to d1.rule.facts.Procedure
at
d1.rule.Rule_8f09c0aa350100000080cb1e0dd40f6fEval4Invoker.evaluate(Unknown
Source)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:114)
Following is the rule. I found that due to "or" the Procedure block not
runs.
If I change "or" to "and" than procedure block executed & the error not
produced.
I am not sure what's the problem, I am using Drool 5.3
rule "8f09c0aa350100000080cb1e0dd40f6f"
when #conditions
(
$cepFacts: CEPFacts(id=="D1")
and
eval($cepFacts.initialize())
and
(
(
$DxDate_1 : ( Medication( name equalsIgnoreCase "Ofloxacin" ) )
and
eval($cepFacts.checkRelativeValues($DxDate_1) )
)
or
(
$DxDate_2 : ( Procedure( name equalsIgnoreCase "Pres antibiotic" )
)
and
eval($cepFacts.checkRelativeValues($DxDate_2) )
)
)
and
(
$DxDate_3 : ( Medication( name equalsIgnoreCase "Trazodone" ) )
and
eval($cepFacts.checkTimeIs($DxDate_3)
)
)
then
resultIds.add("8f09c0aa350100000080cb1e0dd40f6f");
end
--
View this message in context: http://drools.46999.n3.nabble.com/Getting-java-lang-ClassCastException-us...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Drool Function error
by shawn
I write a function in drool, but it always has error.
The error is :The method insertLogical(PreCondition) is undefined for the
type InsertPreCondition
Is it because insertLogical must be used in RHS?
Is there any way to use insertLogical in function or implement the function
in RHS?
code:
import PreCondition;
import Authorization;
function void insertPreCondition(Authorization a) {
// a.getPreCondition() returns an arraylist
for( PreCondition pc : a.getPreCondition() ){
insertLogical( pc );
}
}
--
View this message in context: http://drools.46999.n3.nabble.com/Drool-Function-error-tp3788965p3788965....
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 8 months
Slinding window !
by Hassan
Hi guys,
While trying to understand how slinding window work, I realize that all
exemples are given with "accumulate" or "collect" functions , I din't know
why ??
$a : List() from collect(Event1() over window:time(2s) from entry-point
"point")
// work
Bur why
$a : Event1() over window:time(2s) from entry-point "point")
doesn't work ??!
Thanks,
Youssef AZBAKH
--
View this message in context: http://drools.46999.n3.nabble.com/Slinding-window-tp3783772p3783772.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Order of Execution on Messages
by gboro54
We are currently authoring rules using Drools 5.3 and using jBPM 5.2 for
orchestration. The situation we have is as follows: Certain groups of rules
can execute on n number of messages in any order(i.e the order in which the
consequences occur does not matter). The problem comes in later in the
process when those same n messages need to have their consequences happen in
a certain order. Is there a good way to handle this? We have thought about
appending messages to a queue and just operating on one message at a time
however this seems slow. In addition when utilizing jBPM and drools what is
the best way to batch data in and out of the session. I understand starting
a new session is cheap but was hoping there may be a way to have jBPM insert
n records at a time and just continue to read from the db until no more
records are returned.
TIA!
--
View this message in context: http://drools.46999.n3.nabble.com/Order-of-Execution-on-Messages-tp378401...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months