Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-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 14BCC11E61 for ; Fri, 18 Jul 2014 02:45:21 +0000 (UTC) Received: (qmail 29939 invoked by uid 500); 18 Jul 2014 02:45:20 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 29874 invoked by uid 500); 18 Jul 2014 02:45:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 29858 invoked by uid 99); 18 Jul 2014 02:45:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2014 02:45:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Steve.Zweep@watchguard.com designates 206.191.171.101 as permitted sender) Received: from [206.191.171.101] (HELO XCS01CO.watchguard.com) (206.191.171.101) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2014 02:45:15 +0000 From: Steve Zweep To: "dev@httpd.apache.org" Subject: RE: Question about async mod_proxy_wstunnel and threads Thread-Topic: Question about async mod_proxy_wstunnel and threads Thread-Index: AQHPoiW3eYiZqZoLd0ezAgxYocLRXJulFk+/ Date: Fri, 18 Jul 2014 02:44:54 +0000 Message-ID: <56C2E06F97EACF4FB2F1B31EEFC4493091FA9160@mbx2.wgti.net> References: <56C2E06F97EACF4FB2F1B31EEFC4493091FA8B62@mbx2.wgti.net>, In-Reply-To: Accept-Language: en-CA, en-US Content-Language: en-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Received-SPF: none X-Virus-Checked: Checked by ClamAV on apache.org OK, I'll have a go at that tomorrow. I should note that it doesn't *always*= fail for me. However I haven't yet been able to predict when it will work = and when it won't. I did run it earlier with trace7 logging and basically s= aw no messages for the connections that were stalling. The trunk code I che= cked out was quite recent, and I did confirm I had all the latest fixes in = place.=0A= =0A= I'll send logs and annotations once I've collected them. Thanks Eric.=0A= =0A= - Steve=0A= ________________________________________=0A= From: Eric Covener [covener@gmail.com]=0A= Sent: July 17, 2014 9:15 PM=0A= To: Apache HTTP Server Development List=0A= Subject: Re: Question about async mod_proxy_wstunnel and threads=0A= =0A= I am having trouble seeing it mis-behave. w/ Async and AsyncDelay, I=0A= am seeing the expected trace messages and when I look at backtraces of=0A= httpd I can see zero threads in wstunnel . If I send a server msg, I=0A= get it ASAP in the client -- and then I see 1 thread in poll for the=0A= right couple of seconds=0A= =0A= Can you grab trace at e.g.=0A= =0A= LogLevel INFO proxy_wstunnel_module:trace8=0A= =0A= And annotate the timing a bit for what you do in the client? Is it=0A= possible you have an un-updated trunk from several weeks ago? There=0A= was an optimization put in and backed out that might have broke some=0A= of these same things for a very short window.=0A= =0A= On Thu, Jul 17, 2014 at 2:09 PM, Steve Zweep w= rote:=0A= > Hi=0A= >=0A= >=0A= >=0A= > I am prototyping a system in which we will have a large number of websock= et=0A= > connections between multiple clients and a server (potentially) behind=0A= > mod_proxy_wstunnel. Currently I am testing a trunk build with the event m= pm.=0A= > With ProxyWebsocketAsync turned off, communication between client and ser= ver=0A= > works well except that an Apache thread is held open for each connection= =0A= > (which is expected). With ProxyWebsocketAsync enabled, these threads are = no=0A= > longer seen, again as expected. I see two issues though:=0A= >=0A= > 1. While communication from client to server works well, unsolicite= d=0A= > messages from the server to clients seem to queue. If the client=0A= > subsequently sends a message back to the server, the original message fro= m=0A= > the server is received. I would have expected the data from the server to= =0A= > generate an event resulting in immediate delivery.=0A= >=0A= > 2. In attempts to debug this I experimented with=0A= > ProxyWebsocketAsyncDelay. I observed that when this is used, the connecti= ons=0A= > never go into async mode. I.e. proxy_tunnel_pump() never returns SUSPENDE= D.=0A= > As a result I see the same thread usage as when ProxyWebsocketAsync is=0A= > turned off. Is this expected behavior?=0A= >=0A= >=0A= >=0A= > Any insights into what is going on here would be helpful. I noticed that= =0A= > there have been a number of recent changes both to the event mpm and=0A= > mod_proxy_wstunnel. Perhaps there are still some known issues with this= =0A= > code?=0A= >=0A= >=0A= >=0A= > Thanks=0A= >=0A= >=0A= >=0A= > - Steve=0A= >=0A= >=0A= >=0A= > -----------=0A= >=0A= > Steve Zweep | Senior Software Engineer=0A= >=0A= > WatchGuard Technologies, Inc. | www.watchguard.com=0A= >=0A= >=0A= >=0A= > 905.804.2143=0A= >=0A= > steve.zweep@watchguard.com=0A= >=0A= >=0A= =0A= =0A= =0A= --=0A= Eric Covener=0A= covener@gmail.com=0A=