You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Danushka Menikkumbura (JIRA)" <ji...@apache.org> on 2011/03/23 07:24:05 UTC
[jira] [Commented] (QPID-3162) Memory leak in Java Broker when
large number of connections created
[ https://issues.apache.org/jira/browse/QPID-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010013#comment-13010013 ]
Danushka Menikkumbura commented on QPID-3162:
---------------------------------------------
I see a memory leak in the Java broker when I try to use large number of connections in a loop even I close them properly at the end.
This issue can be recreated by running the following simple piece of JMS client code.
<snippet>
Properties properties = new Properties();
properties.put("connectionfactory.qpidConnectionfactory",
"amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5672'");
properties.put("queue.queueName", "example.RequestQueue");
properties.put("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
final Context context = new InitialContext(properties);
for (int i = 0; i < 50; i++) {
ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
Connection connection = connectionFactory.createConnection();
connection.start();
connection.stop();
connection.close();
}
</snippet>
I can only use up to 1993 connections as JVM dies with an out-of-memory error at which point the JVM memory consumption is around 1G.
> Memory leak in Java Broker when large number of connections created
> -------------------------------------------------------------------
>
> Key: QPID-3162
> URL: https://issues.apache.org/jira/browse/QPID-3162
> Project: Qpid
> Issue Type: Bug
> Reporter: Danushka Menikkumbura
> Priority: Blocker
>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org