From users-return-28169-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Jul 12 01:58:52 2011 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 4FE7A45CB for ; Tue, 12 Jul 2011 01:58:52 +0000 (UTC) Received: (qmail 76482 invoked by uid 500); 12 Jul 2011 01:58:51 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 76443 invoked by uid 500); 12 Jul 2011 01:58:51 -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 76435 invoked by uid 99); 12 Jul 2011 01:58:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2011 01:58:51 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ken@puppetlabs.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-iw0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2011 01:58:46 +0000 Received: by iwn34 with SMTP id 34so5422193iwn.2 for ; Mon, 11 Jul 2011 18:58:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.191.216 with SMTP id dn24mr5124664ibb.32.1310435905637; Mon, 11 Jul 2011 18:58:25 -0700 (PDT) Received: by 10.231.33.71 with HTTP; Mon, 11 Jul 2011 18:58:25 -0700 (PDT) In-Reply-To: <1310435435564-3661277.post@n4.nabble.com> References: <1309561812427-3639513.post@n4.nabble.com> <1310435435564-3661277.post@n4.nabble.com> Date: Tue, 12 Jul 2011 02:58:25 +0100 Message-ID: Subject: Re: AMQ does not drop connection on stomp client ungraceful shutdown From: Ken Barber To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Setting tcp_keeliave_time is pretty normal practice in this case. The client can only enable the SO_KEEPALIVE setting on a socket, but its not responsible for the tcp_keepalive_time as you have discovered :-). In regards to your earlier 10 minute drops do you have any firewalls in between your clients and the STOMP connector? Some firewalls and load-balancing devices will only keep state for a short time - which may explain the 10 minutes perhaps. Checkpoint defaults to an hour for example - but I've seen F5 load-balancers dropping state after 5 minutes ... its user configurable in both cases however. ken. On Tue, Jul 12, 2011 at 2:50 AM, reachrichrulez wrote: > Martin, > Thanks for your response. > > I set the ?transport.keepAlive=true on the stomp TransportConnector url on > the broker, but there was no effect. jconsole still showed the connection > for a long time. It appears that this setting relies on the OS > tcp_keepalive_time which is defaulted to 2 hours > > Even after the power cable was pulled off, netstat -a still showed the > connection. Then I modifed the linux tcp settings (tcp_keepalive_time, > tcp_keepalive_intvl and tcp_keepalive_probes) and then the connections were > closed within a few minutes. Even jconsole reflected the same. > > What makes me wonder is that the default for the tcp_keepalive_time is 7200 > seconds(2 hours), but in my original test case scenario the broker > recognized that powered off consumer in ~10 min in sent all the messages to > the other connected consumer. Where is this ~10 min configured? > > Also, It appears from the source code that inactivity monitor for stomp i > disabled. > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-does-not-drop-connection-on-stomp-client-ungraceful-shutdown-tp3639513p3661277.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig"