Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 68881 invoked from network); 10 Feb 2009 02:10:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Feb 2009 02:10:07 -0000 Received: (qmail 59249 invoked by uid 500); 10 Feb 2009 02:09:55 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 59218 invoked by uid 500); 10 Feb 2009 02:09:55 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 59205 invoked by uid 99); 10 Feb 2009 02:09:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2009 18:09:55 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [69.25.86.41] (HELO sodium.colo.stayonline.net) (69.25.86.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2009 02:09:47 +0000 X-ASG-Debug-ID: 1234231765-6b8400100000-PXi1IZ X-Barracuda-URL: http://192.168.5.11:8000/cgi-bin/mark.cgi Received: from et-tlh-0.site.stayonline.net (unknown [12.27.135.130]) by sodium.colo.stayonline.net (Spam Firewall) with ESMTP id 585BB165F30 for ; Mon, 9 Feb 2009 21:09:25 -0500 (EST) Received: from et-tlh-0.site.stayonline.net ([12.27.135.130]) by sodium.colo.stayonline.net with ESMTP id L1rxb1d2WEhrA1QG for ; Mon, 09 Feb 2009 21:09:25 -0500 (EST) Received: from [192.168.50.82] ([192.168.50.82]) by et-tlh-0.site.stayonline.net (8.13.8/8.12.6) with ESMTP id n1A29PrK006831 for ; Tue, 10 Feb 2009 02:09:25 GMT Message-ID: <4990E1D4.80106@hanik.com> Date: Mon, 09 Feb 2009 19:09:24 -0700 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Tomcat Users List X-ASG-Orig-Subj: Re: comet loop after webapp re-start Subject: Re: comet loop after webapp re-start References: <176a7eb80902041337t238977cfgc504803449e185fa@mail.gmail.com> In-Reply-To: <176a7eb80902041337t238977cfgc504803449e185fa@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: UNKNOWN[12.27.135.130] X-Barracuda-Start-Time: 1234231766 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.17419 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS X-Virus-Checked: Checked by ClamAV on apache.org are you not getting the END event at all, even after the app is reloaded? Filip Peter Warren wrote: > I'm running tomcat 6.0.18 on Ubuntu 8.10. I have a comet application > that maintains an open connection with tomcat. If I re-start my > webapp and then close the client connection, tomcat goes into a loop > and chews up all cpu. This server is not live and only has my single > client. > > The ClientPoller thread consumes most of the cpu running through the > following stack over and over. > > Daemon Thread [http-80-ClientPoller] (Suspended (breakpoint at line > 654 in ThreadPoolExecutor)) > ThreadPoolExecutor.execute(Runnable) line: 654 > NioEndpoint.processSocket(NioChannel, SocketStatus, boolean) line: 1161 > NioEndpoint.processSocket(NioChannel, SocketStatus) line: 1148 > NioEndpoint$Poller.processKey(SelectionKey, > NioEndpoint$KeyAttachment) line: 1555 > NioEndpoint$Poller.run() line: 1508 > Thread.run() line: 619 > > This is not a problem with my CometProcessor not handling the comet > events; the END event when the client connection is closed is never > delivered to my CometProcessor, understandably since I just re-started > the webapp and there is now a new CometProcessor instance. > > I believe what is happening is that the NIO connector is trying to > deliver the END event to a CometProcessor that no longer exists and > just keeps trying. Should the NIO connector recognize that the event > is undeliverable and give up? Or is there something I need to do in > webapp shutdown code to tell the NIO processor to disregard any open > connections? > > The workaround is to always re-start the tomcat instead of just the > webapp. This is possible for me since my server is only serving a > single webapp. > > Peter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org