Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 34221 invoked from network); 29 Mar 2011 16:12:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 16:12:21 -0000 Received: (qmail 53720 invoked by uid 500); 29 Mar 2011 16:12:20 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 53691 invoked by uid 500); 29 Mar 2011 16:12:20 -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 53683 invoked by uid 99); 29 Mar 2011 16:12:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 16:12:20 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of nkolev@healthmarketscience.com does not designate 208.65.145.80 as permitted sender) Received: from [208.65.145.80] (HELO p02c12o147.mxlogic.net) (208.65.145.80) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 16:12:15 +0000 Received: from unknown [67.132.206.99] (EHLO donkey.hmsonline.com) by p02c12o147.mxlogic.net(mxl_mta-6.9.0-2) with ESMTP id 9c4029d4.0.5954.00-176.14778.p02c12o147.mxlogic.net (envelope-from ); Tue, 29 Mar 2011 10:11:54 -0600 (MDT) X-MXL-Hash: 4d9204ca036edbf8-28f1cb004c3721217241fba0c25108f822e7a577 Received: from pwex01.zoo.hmsonline.com (pwex01.hmsonline.com [10.67.88.109]) by donkey.hmsonline.com (8.13.1/8.13.1) with ESMTP id p2TGBc0c000665 for ; Tue, 29 Mar 2011 12:11:38 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: how do i stop session Inactivity monitoring/enforcing? Date: Tue, 29 Mar 2011 12:10:56 -0400 Message-ID: <67B9FB634299E5469D36BF5B3537F02401740482@pwex01.zoo.hmsonline.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: how do i stop session Inactivity monitoring/enforcing? Thread-Index: AcvuKKa8ArKPkNdLQ02vcCDnXFYCHgAAQsWg References: <67B9FB634299E5469D36BF5B3537F02401740465@pwex01.zoo.hmsonline.com> From: "Nik Kolev" To: X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2010122901)] X-MAIL-FROM: X-SOURCE-IP: [67.132.206.99] X-AnalysisOut: [v=1.0 c=1 a=W3U3TV5oWpgA:10 a=BLceEmwcHowA:10 a=8nJEP1OIZ-] X-AnalysisOut: [IA:10 a=xdWuvbPJTlx+8X/s3BW2YQ==:17 a=pGLkceISAAAA:8 a=mV9] X-AnalysisOut: [VRH-2AAAA:8 a=JzW_xaUgAAAA:8 a=H47F_IDwAAAA:8 a=-BTKDJnIAA] X-AnalysisOut: [AA:8 a=ojAIvI_YgtVp4q0vR7kA:9 a=OxNx91J-sy1dqMImS8MA:7 a=x] X-AnalysisOut: [Qi9ZJC2YiY5o_KIrTByliHqMQYA:4 a=wPNLvfGTeEIA:10 a=uMMInA9n] X-AnalysisOut: [ZTYA:10 a=mELiTeGOAo4A:10 a=MSl-tDqOz04A:10 a=m7JGeT4NNjQA] X-AnalysisOut: [:10] Thanks for the prompt reply. I'd like to make sure I understand my options:=20 Option 1: Just change activemq.xml broker config (please check how I am specifying = the parameter): ...and regardless what the clients say (nothing or something specific) = the 0 (no inactivity monitoring) wins? Option 2: Change the activemq broker config: And the client connect URL: tcp://host:61616?useInactivityMonitor=3Dfalse ...but if the client does not specify 'useInactivityMonitor=3Dfalse' and = uses something between [1,30] or nothing (the default 30) there *will = be* inactivity monitoring for this particular client connection? -nik -----Original Message----- From: Gary Tully [mailto:gary.tully@gmail.com]=20 Sent: Tuesday, March 29, 2011 11:47 AM To: users@activemq.apache.org Subject: Re: how do i stop session Inactivity monitoring/enforcing? the value used is the min of the client and broker values. When disabling it, using 0, the 0 always wins. When increasing it past the default 30, both ends need to agree. There is an option to disable the Inactivity monitor filter altogether, such that there is no negotiation. On the server, use: tcp://localhost:XXX?transport.useInactivityMonitor=3Dfalse options prefixed with transport are applied to new transport connections rather than to the bound socket. And configure the client via: tcp://host:xxx?useInactivityMonitor=3Dfalse On 29 March 2011 16:03, Nik Kolev = wrote: > Environment & versions: > =3D=3D=3D=3D Activemq: > =A0 =A0 5.3.2 > =3D=3D=3D=3D OS: > =A0 =A0 RHEL5 (Linux xxx.yyy.zzz 2.6.18-238.1.1.el5 #1 SMP Tue Jan 4 > 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux) > =3D=3D=3D=3D Java (both on the apps- and activemq- side): > =A0 =A0 java version "1.6.0_13" > =A0 =A0 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) > =A0 =A0 Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) > > The activemq configuration is the out-of-the-box one without any = tweaks. > The clients connect on the tcp transport. Here's the relevant config > snippet from the broker's activemq.xml: > > =A0 > > > The producers and consumers on the activemq managed queues (Java > applications running within JBoss) use "tcp://x.x.x.x:61616" as the = JMS > destination JNDI URL to open JMS connections. > > Usually on a Monday after no activity during the weekend we see the > following exceptions when we try to run things in the environment: > javax.jms.JMSException: Channel was inactive for too long: > tlcvmq01/x.x.x.x:61616 > =A0 =A0 =A0 =A0at > = org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport. > java:62) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnect > ion.java:1245) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnectio > n.java:1237) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQSession.asyncSendPacket(ActiveMQSession.java > :1857) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQMessageConsumer.doClose(ActiveMQMessageConsu > mer.java:654) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQMessageConsumer.close(ActiveMQMessageConsume > r.java:645) > =A0 =A0 =A0 =A0at > = com.hmsonline.cvutils.workdistribution.JmsThreadedConsumer.run(JmsThread > edConsumer.java:116) > =A0 =A0 =A0 =A0at java.lang.Thread.run(Thread.java:619) > Caused by: org.apache.activemq.transport.InactivityIOException: = Channel > was inactive for too long: tlcvmq01/x.x.x.x:61616 > =A0 =A0 =A0 =A0at > = org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor > .java:235) > =A0 =A0 =A0 =A0at > = org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.jav > a:83) > =A0 =A0 =A0 =A0at > = org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNego > tiator.java:104) > =A0 =A0 =A0 =A0at > = org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java: > 40) > =A0 =A0 =A0 =A0at > = org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelat > or.java:60) > =A0 =A0 =A0 =A0at > = org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnect > ion.java:1243) > =A0 =A0 =A0 =A0... 6 more > and we basically need to reconnect the clients to be able to run = things > again. > > Googling a bit and reading the documentation on the activemq site = showed > that there is a way to turn the "inactivity policy" off, but the posts > that google found and the actual docs are sketchy and conflicting a = bit. > Some posts say that all that's needed is passing the > wireFormat.maxInactivityDuration=3D0 pair on the connect string that = the > client is using (tcp://x.x.x.x:61616? > wireFormat.maxInactivityDuration=3D0). The documentation however hints > that this parameter needs to match the broker's configuration as well. > More specifically this page > http://activemq.apache.org/configuring-wire-formats.html says "When > using the maxInactivityDuration option, the setting must match on both > sides of the connection. The default value the maxInactivityDuration > option on the broker side is 30 seconds so each consumer must have the > same setting so that the option actually takes effect. If the settings > do not match, the option will have no effect". I looked here - > http://activemq.apache.org/configuring-transports.html - in the = "Server > Side Options" section and could not spot any transport connector = option > that specifies the server side maxInactivityDuration setting. > > Long story short, the questions I have are: > 1) By default what is the duration that causes the > InactivityIOException-s? The documentation suggests 30 seconds, but I = do > not experience it in that short of a frame. > 2) How can I turn inactivity timeouts off? Is there a way to find out > (log, etc) whether the turn-inactivity-monitoring-off configuration is > in effect (short of leaving the environment inactive for a long period > of time and trying activity)? > > Help/feedback will be much appreciated. > > Thanks, > -nik > > > --=20 http://blog.garytully.com http://fusesource.com