httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Zweep <Steve.Zw...@watchguard.com>
Subject RE: Question about async mod_proxy_wstunnel and threads
Date Mon, 21 Jul 2014 15:55:46 GMT
My client and server are based on sample code included with the ws4py package (http://ws4py.readthedocs.org/en/latest/).
We use CherryPy and the ws4py package contains a CherryPy-based server (attached).

The client is a variation of the echo_client.py sample code also included in the ws4py package.
 
In terms of failure rate, I'd say it is about 90%. Often I start 2 clients and initially it
works OK, but then stops after a message or two. Once it has failed, I can send any number
of messages from the one client and continue to see the server echo them back, but no message
is received by the second. When I then send a message from the second client I see a flood
of messages from the server that had been queued.

- Steve


-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: Saturday, July 19, 2014 8:16 AM
To: Apache HTTP Server Development List
Subject: Re: Question about async mod_proxy_wstunnel and threads

I guess it is kind of telling that we could still respond to the write from client 2, there
are probably more potential errors that make us lose track of both sides simultaneously.

Can you share your ws client and server if they're easy to use? My little sample doesn't spray
that way.

I'm also curious approximately how often it fails this way.

On Fri, Jul 18, 2014 at 5:50 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> Probably a false trail, trunk at r1611741 is up to date, I think 1.5.x 
> won't help.
>
> On Fri, Jul 18, 2014 at 11:35 PM, Steve Zweep 
> <Steve.Zweep@watchguard.com> wrote:
>> Hi Yann,
>>
>> The test I ran today was built with APR from trunk (r1611741). I see that r1605769
modifies apr_skiplist.c and there has been a lot of activity in the  trunk version of that
code lately. I can try with the 1.5.x branch code to see if it makes a difference. Probably
won't get to this before Monday though.
>>
>> - Steve
>>
>> -----Original Message-----
>> From: Yann Ylavic [mailto:ylavic.dev@gmail.com]
>> Sent: Friday, July 18, 2014 4:51 PM
>> To: httpd
>> Subject: Re: Question about async mod_proxy_wstunnel and threads
>>
>> Hi Steve,
>>
>> can you still reproduce with the latest APR 1.5.x, notably containing this fix: http://svn.apache.org/r1605769.
>> I don't think there is a released version with this patch...
>>
>> Regards,
>> Yann.
>>
>> On Fri, Jul 18, 2014 at 9:38 PM, Steve Zweep <Steve.Zweep@watchguard.com> wrote:
>>> I've attached annotated logs that show the issues I described. Both scenarios
have ProxyWebsocketAsync turned on. The first does not use the AsyncDelay and shows how server
messages stall and are not delivered until the client polls. The second has ProxyWebsocketAsyncDelay
set to 100. In that case, message processing works properly, but threads are held open and
there is no sign of async processing.
>>>
>>> Since my build and execution environment were somewhat non-standard, I repeated
all the tests today on stock Ubuntu 14.04, with a fresh checkout and build of httpd and apr
trunk code. The same results were observed.
>>>
>>> - Steve
>>>
>>>
>>>
>>> -----Original Message-----
>>> ________________________________________
>>> From: Eric Covener [covener@gmail.com]
>>> Sent: July 17, 2014 9:15 PM
>>> To: Apache HTTP Server Development List
>>> Subject: Re: Question about async mod_proxy_wstunnel and threads
>>>
>>> I am having trouble seeing it mis-behave. w/ Async and AsyncDelay, I 
>>> am seeing the expected trace messages and when I look at backtraces 
>>> of httpd I can see zero threads in wstunnel . If I send a server 
>>> msg, I get it ASAP in the client -- and then I see 1 thread in poll 
>>> for the right couple of seconds
>>>
>>> Can you grab trace at e.g.
>>>
>>> LogLevel INFO proxy_wstunnel_module:trace8
>>>
>>> And annotate the timing a bit for what you do in the client?  Is it possible
you have an un-updated trunk from several weeks ago?  There was an optimization put in and
backed out that might have broke some of these same things for a very short window.
>>>



--
Eric Covener
covener@gmail.com
Mime
View raw message