Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 6019 invoked from network); 30 Apr 2007 15:35:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2007 15:35:55 -0000 Received: (qmail 42453 invoked by uid 500); 30 Apr 2007 15:36:02 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 42322 invoked by uid 500); 30 Apr 2007 15:36:01 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 42313 invoked by uid 99); 30 Apr 2007 15:36:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 08:36:01 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 08:35:54 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A0087714062 for ; Mon, 30 Apr 2007 08:35:34 -0700 (PDT) Message-ID: <1934213.1177947334651.JavaMail.jira@brutus> Date: Mon, 30 Apr 2007 08:35:34 -0700 (PDT) From: "anish pathadan (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-1214) threads not stopping causing memory leaks which can lead to OutOfMemoryError In-Reply-To: <2959776.1175007874525.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39078 ] anish pathadan commented on AMQ-1214: ------------------------------------- Hi All, This bug can be closed as the threads persisted are valid. If we run the original test case(ie threadleaker.tar.gz), we can see the threads which persisted are two "ActiveMQ Scheduler" threads. These threads are executed using ScheduledThreadPoolExecutor with a pool size of 5. Pool size of 5 means a maximum of 5 such threads will be available in the pool and these threads will be used to execute n number of "ActiveMQ Scheduler" threads. If connection is created and closed a lot of times, a maximum of 5 "ActiveMQ Scheduler" threads and lots of "ActiveMQ Connection worker" threads will be created.The latter thread is created to be timed out after 5 seconds of creation. This can be verified by executing the attached test.java . This testcase prints the total number of threads in the system after a connection.start() and connection.close() is called.The total number of threads never increases to a very high number as the initial threads are getting timed out. Thanks, Anish > threads not stopping causing memory leaks which can lead to OutOfMemoryError > ---------------------------------------------------------------------------- > > Key: AMQ-1214 > URL: https://issues.apache.org/activemq/browse/AMQ-1214 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 4.1.0 > Environment: Fedora Core 6 > Reporter: Xavier Toth > Attachments: test.java, threadleak.tar.gz > > > Threads started by ActiveMQ on behalf of a client persist in a ThreadGroup despite calling the 'interrupt' method on the group thereby leaking memory. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.