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

anniejoseph chithraannie at gmail.com
Tue Jun 25 03:40:40 EDT 2013


Hi,
	I'm using jBoss Rules.But I run in to memory issues after using JBoss
rules. Using a profiling tool I collected heap dump 
	and I got the result as :
	
	/One instance of "org.drools.reteoo.ReteooStatefulSession" loaded by 
	"sun.misc.Launcher$AppClassLoader @ 0x7f899fdb6d88" occupies 657,328,888
(78.91%) bytes. 
	The memory is accumulated in one instance of
"*org.drools.reteoo.ReteooStatefulSession*" 
	loaded by "sun.misc.Launcher$AppClassLoader @ 0x7f899fdb6d88".

	Keywords
	sun.misc.Launcher$AppClassLoader @ 0x7f899fdb6d88
	org.drools.reteoo.ReteooStatefulSession/
	
	The code I used for JBoss rules is given below.
	
		kbase= KnowledgeBaseFactory.newKnowledgeBase();
		ksession= kbase.newStatefulKnowledgeSession();
		final String str =
CISMSRemotingUtils.getFullConfigFilePath("change-set.xml") ;
		final String filePath = str.replaceAll(" ", "%20");
		aconf = KnowledgeAgentFactory .newKnowledgeAgentConfiguration(); 
	        aconf.setProperty("drools.agent.newInstance", "false"); 
	        kagent = KnowledgeAgentFactory.newKnowledgeAgent( "Agent", aconf); 
		kagent.applyChangeSet( ResourceFactory.newFileResource(filePath) );
		kbase = kagent.getKnowledgeBase();
		ksession= kbase.newStatefulKnowledgeSession();
		sconf
=ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
		sconf.setProperty( "drools.resource.scanner.interval", "3600"); 
		ResourceFactory.getResourceChangeScannerService().configure( sconf );
		ResourceFactory.getResourceChangeNotifierService().start();
		ResourceFactory.getResourceChangeScannerService().start();
		
	This piece of code is given in the class constructor and rules are fired
inside this class
	
		ksession.insert(data);
		ksession.fireAllRules();
		
	Can anyone help me to identify the problem?



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


More information about the rules-users mailing list