[jboss-jira] [JBoss JIRA] Created: (JGRP-599) Exception in thread "main" java.lang.OutOfMemoryError: Java heap space running with a Multiplex channel
Rita Patel (JIRA)
jira-events at lists.jboss.org
Wed Sep 26 17:57:41 EDT 2007
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space running with a Multiplex channel
-------------------------------------------------------------------------------------------------------
Key: JGRP-599
URL: http://jira.jboss.com/jira/browse/JGRP-599
Project: JGroups
Issue Type: Bug
Affects Versions: 2.5.1
Environment: Linux
Reporter: Rita Patel
Assigned To: Bela Ban
Priority: Critical
My test application goes out of memory after about running for ~85-90 mins. (with 2.5.1 groups released version)
Test app just creates a multiplex channel ( uses UDP protocol) and broadcast the message. (I only have one member in cluster for testing)
Would you please take a look at the test code and let me know if I am not implementing multiplex channel correctly.
public class TestJGroups {
static Logger log = Logger.getLogger(TestJGroups.class);
public static void main(String[] args) throws Exception{
BasicConfigurator.configure();
Logger.getRootLogger().setLevel(Level.DEBUG);
Logger.getLogger("org.jgroups").setLevel(Level.DEBUG);
log.info("log4j is set up correctly.");
log.info("this thread iD: "+Thread.currentThread().getId());
Channel mulplexChannel2 = createMultiplexerChannel("Service_Registry");
log.info("I have created mux channgel");
while(true){
//Thread.sleep(10000);
mulplexChannel2.send(new Message(null,null,"Hello world".getBytes()));
log.info("after sending message to all");
//DaemonThreadUtility.printCurrentDaemonThreads(log.getName());
}
}
private static Channel createMultiplexerChannel(String channelID) throws Exception{
String CFG = "/users/rpatel/sandbox/stacks.xml";
String STACK_NAME = "udp";
ChannelFactory factory = new JChannelFactory();
File configFile = new File(CFG);
Channel channel = null;
factory.setMultiplexerConfig(configFile);
channel = factory.createMultiplexerChannel(STACK_NAME, channelID);
log.debug("after createing multiplexer channel");
//DaemonThreadUtility.printCurrentDaemonThreads(log.getName());
channel.connect(channelID);
log.debug("after connecting multiplexer channel");
//DaemonThreadUtility.printCurrentDaemonThreads(log.getName());
return channel;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list