Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A30B0445D for ; Wed, 29 Jun 2011 23:43:53 +0000 (UTC) Received: (qmail 77143 invoked by uid 500); 29 Jun 2011 23:43:53 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 76726 invoked by uid 500); 29 Jun 2011 23:43:52 -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 76709 invoked by uid 99); 29 Jun 2011 23:43:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 23:43:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 23:43:49 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9E384439C3C for ; Wed, 29 Jun 2011 23:43:28 +0000 (UTC) Date: Wed, 29 Jun 2011 23:43:28 +0000 (UTC) From: "Timothy Bish (JIRA)" To: dev@activemq.apache.org Message-ID: <546117344.4138.1309391008629.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1660780268.9579.1299714780196.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (AMQ-3214) "InactivityMonitor Async Task" threads leaking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AMQ-3214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQ-3214. ------------------------------- Resolution: Fixed Added the call to allowCoreThreadTimeOut(true) since it shouldn't affect the code regardless. > "InactivityMonitor Async Task" threads leaking > ---------------------------------------------- > > Key: AMQ-3214 > URL: https://issues.apache.org/jira/browse/AMQ-3214 > Project: ActiveMQ > Issue Type: Bug > Components: JMS client, Transport > Reporter: Minh Do > Priority: Critical > Fix For: 5.6.0 > > Attachments: threadleak.png > > Original Estimate: 1h > Remaining Estimate: 1h > > -Have a multi-thread consumers running to consumer messages > -Have Connection to have these : > ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUrl); > connectionFactory.setUseAsyncSend(false); > connectionFactory.setDispatchAsync(false); > connectionFactory.setAlwaysSessionAsync(false); > connectionFactory.setAlwaysSyncSend(true); > -Run the consumers for several hours and profile it > -You will see there are threads with the name "InactivityMonitor Async Task" being spawning continuously > This will cause the entire consumer system to slow down eventually due to thread context switching. > Suggestion to fix: we should not put a limit on the number of "InactivityMonitor Async Task" threads to be Max Integer. There is a bug in Java lib that > it will not stop a thread after a given idle time-to-live. We could fix this in the file InactivityMonitor.java -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira