Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70C3D1087B for ; Mon, 17 Jun 2013 19:35:56 +0000 (UTC) Received: (qmail 2605 invoked by uid 500); 17 Jun 2013 19:35:56 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 2583 invoked by uid 500); 17 Jun 2013 19:35:55 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 2575 invoked by uid 99); 17 Jun 2013 19:35:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 19:35:55 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of christian.posta@gmail.com designates 209.85.217.170 as permitted sender) Received: from [209.85.217.170] (HELO mail-lb0-f170.google.com) (209.85.217.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2013 19:35:49 +0000 Received: by mail-lb0-f170.google.com with SMTP id t13so2899637lbd.1 for ; Mon, 17 Jun 2013 12:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=z7du6kE4z8k6T/HV/7cA3wYEjjGIWzjgaILGlz9SRxQ=; b=Dt7ltI1W7ksYuoJYsmF3P2EMssTkGAlAiTyv5gjJmZFsV/xdyfAuKNcynrYrERt0T6 yW87BqA3GasxyIsmAvSiF/0cASHTpAT9My6fB4+F1RI16wcNsqTOfbd+2f2/u1VK/26m xERTc4c3tcoPQ1eQ6OItmLPN+Y949QobSh1uI/SrqoCgXRBhpxOullJ23DTXDAqV4CbQ Hl2hlX/Sq5v+TuuxArEWU6p/ftQHBsNGs1ze0UprwP967k9hxZGtx59iiXomRx7q8Gu/ 3k0xZQ9MxUxN2Ig5E7dcsBVFXlBRnVC98TAUOsdql4dAtYDNUUwGpmmV462S3WFzPlhW uJSA== MIME-Version: 1.0 X-Received: by 10.152.170.138 with SMTP id am10mr7546154lac.22.1371497728149; Mon, 17 Jun 2013 12:35:28 -0700 (PDT) Received: by 10.114.185.37 with HTTP; Mon, 17 Jun 2013 12:35:28 -0700 (PDT) In-Reply-To: References: <1370893741985-4668062.post@n4.nabble.com> <1371171504822-4668198.post@n4.nabble.com> <15be921c.1dafb.13f410e0015.Coremail.jswqne@163.com> <7c59c171.ed0d.13f4c0680cb.Coremail.jswqne@163.com> Date: Mon, 17 Jun 2013 15:35:28 -0400 Message-ID: Subject: Re: Thread leak in Activemq 5.6 From: Christian Posta To: "users@activemq.apache.org" Content-Type: multipart/alternative; boundary=089e01177213e591c204df5eb291 X-Virus-Checked: Checked by ClamAV on apache.org --089e01177213e591c204df5eb291 Content-Type: text/plain; charset=ISO-8859-1 I've opened a JIRA here: https://issues.apache.org/jira/browse/AMQ-4586 The workaround for your case is to use the failover transport and you won't see the executor threads leaked. On Mon, Jun 17, 2013 at 11:23 AM, Christian Posta wrote: > Yah, I can verify this is the case. Threads leak because the > threadpoolexecutor doesn't evict the threads. Checking for the best > solution to this. > > > On Sun, Jun 16, 2013 at 4:07 AM, lzr wrote: > >> Dear all, >> >> >> I found a thread leak issue during try activemq 5.6: >> I create connection when sending message and close it once the sending >> finished. >> Occassionally I restart activemq broker and found one thread generated >> with name "ActiveMQ Connection Executor...". >> For deep research, I restarted the broker several times and same number >> thread generated; I attached the picture of my debug. >> Could anybody give me some clues? I just want to know if this is a bug >> for ActiveMQ. The attachments includes my applications and the debugging >> pictures. >> >> >> It would be much appreciated if you make any suggestion!!! >> >> >> Thanks in advance, >> Zhuran Li >> >> >> >> >> >> >> >> >> At 2013-06-14 23:03:55,"Christian Posta" >> wrote: >> >Would need to be able to re-create this... Please put together a unit >> test >> >that reproduces this. >> > >> > >> >On Fri, Jun 14, 2013 at 1:00 AM, lzr wrote: >> > >> >> Dear all, >> >> >> >> >> >> I'm using Acitvemq 5.6 with my app and struggling to handle the >> following >> >> Exception: >> >> 2013-06-13 09:53:46,018 | WARN | Send failed for: >> ActiveMQObjectMessage >> >> {commandId = 6, responseRequired = false, messageId = >> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination = >> null, >> >> originalTransactionId = null, producerId = >> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination = >> >> queue://10408_base, transactionId = >> >> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0, >> timestamp = >> >> 1371088670829, arrival = 0, brokerInTime = 1371088426003, >> brokerOutTime = >> >> 0, correlationId = null, replyTo = null, persistent = true, type = >> null, >> >> priority = 4, groupID = null, groupSequence = 0, targetConsumerId = >> null, >> >> compressed = false, userID = null, content = >> >> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties = >> >> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null, >> >> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13 >> >> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false, >> >> readOnlyBody = false, droppable = fals >> >> e}, missing producer state for: >> >> org.apache.activemq.broker.ProducerBrokerExchange@c44470 | >> >> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:/// >> >> 10.1.100.66:64118 >> >> 2013-06-13 09:53:46,018 | WARN | Async error occurred: >> >> javax.jms.JMSException: Cannot send message to queue://10408_base with >> >> invalid (null) producer state | >> >> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ >> >> Transport: tcp:///10.1.100.66:64118 >> >> javax.jms.JMSException: Cannot send message to queue://10408_base with >> >> invalid (null) producer state >> >> at org.apache.activemq.broker.region.Queue.send(Queue.java:589) >> >> at >> >> >> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407) >> >> at >> >> >> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503) >> >> at >> >> >> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305) >> >> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129) >> >> at >> >> >> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96) >> >> at >> >> >> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306) >> >> at >> >> >> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135) >> >> at >> >> >> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453) >> >> at >> >> >> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681) >> >> at >> >> >> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) >> >> at >> >> >> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150) >> >> at >> >> >> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) >> >> at >> >> >> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) >> >> at >> >> >> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229) >> >> at >> >> >> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) >> >> at >> >> >> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222) >> >> at >> >> >> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204) >> >> at java.lang.Thread.run(Thread.java:619) >> >> >> >> >> >> Could anybody give me some clue? It would be much appreciated if any >> >> questions. >> >> >> >> >> >> Thanks a lot, >> >> Zhuran Li >> > >> > >> > >> > >> >-- >> >*Christian Posta* >> >http://www.christianposta.com/blog >> >twitter: @christianposta >> > > > > -- > *Christian Posta* > http://www.christianposta.com/blog > twitter: @christianposta > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta --089e01177213e591c204df5eb291--