[rules-users] Memory-Problemwith instance of "ReteooStatefulSession"

anniejoseph chithraannie at gmail.com
Tue Jun 25 08:42:55 EDT 2013


Hi,
	Thanks for your reply.
	Sorry for my mistake. Actually I don't know the number of facts that I have
in the session when memory consumption was high.
	The rules are firing continuously (the application that use these rules
were running continuusly for 1 month, this the rule engine also).
	After 1 month appliction got stuck and thus I came to analyze the heap
dump.
	
	rule1 "to identify whether it is an Information"

	rule "Set Information"
	  no-loop true
	  when
		   $alert       :	Alert(Information == "Y")
	 not Information( InformationId == $alert.InformationId )
		  
	  then
		   debugLog(drools,"Set Information ");
		   Information Information = new Information();
		   Information.setMetric($alert.getMetric());
		   Information.setObjMetric($alert.getObjMetric());
		   Information.setInformationId($alert.getThresholdSettingId());
		   Information.setAffCount(1);
		   Information.setLastLoadTime(System.currentTimeMillis());
		   Information.setEventType($alert.getMetric().getEventType());
		   Information.setObjectId($alert.getMetric().getObjectId());
		   insert (Information);
		   traceLog(drools,"Information Count : "+Information.getAffCount());
		   retract($alert);
		   
	  end;

	rule "Track Information Count" 
	 no-loop true 
	 when 
		   $alert    : Alert(Information == "Y") 
		   $Information  : Information( InformationId == $alert.InformationId ,
$alert.currentTimeMillis-lastLoadTime < 60000) 
	 then 
		   debugLog(drools,"Track Information count"); 
		   $Information.setMetric($alert.getMetric()); 
		   $Information.setObjMetric($alert.getObjMetric()); 
		   $Information.incrementCount(); 
		   $Information.setLastLoadTime(System.currentTimeMillis()); 
		   update($Information); 
		   traceLog(drools,"Information Count : "+$Information.getAffCount()); 
		   retract($alert);   
	 end;
	 
	 rule4 "to check time interval"
	 
	 rule5 "to persist Information to DB"
			In this rule  retract Information



--
View this message in context: http://drools.46999.n3.nabble.com/Memory-Problemwith-instance-of-ReteooStatefulSession-tp4024509p4024537.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list