The problem: httpd 1.3.x does not close origin server proxy connections when client connection closes (perhaps pathologically).
Chuck
Begin forwarded message:
From: Steve Barber <[EMAIL PROTECTED]> Date: Mon Jul 23, 2001 05:33:32 PM US/Eastern To: Chuck Murcko <[EMAIL PROTECTED]> Subject: Re: mod_proxy question -- keep-alive teardowns
Chuck --
I found the bug. Nothing to do with keep-alives. The interesting thing is that
this problem shouldn't manifest itself if proxy caching is turned on; it will
only show up if cacheing is off, as it was in our environment.
The 2.0 proxy source looks like it won't have the problem, but that was just a
cursory glance on my part.
See Apache PR mod_proxy/8067 for details.
I think the fix is:
--- src/modules/proxy/proxy_util-old.c Mon Jul 23 14:18:31 2001 +++ src/modules/proxy/proxy_util.c Mon Jul 23 14:21:40 2001 @@ -605,6 +605,8 @@ unlink(c->tempfile); c = NULL; } + } else { + ok = 0; } con->aborted = 1; break;
-Steve Barber
Chuck Murcko wrote:
Wow. 8^)
I'd tend to think the proxy should drop its associated (possibly persistent) server connections when the client connection goes away. We're not pooling connections yet in the proxy.
I'll look at the 1.3.20 source and the rewrite of mod_proxy for 1.3.21 (not yet released, but in anonCVS under httpd-proxy module, it does HTTP/1.1 server-side at last, still HTTP/1.0 client, and will likely remain that way) to see if they are checking the client connection, or just stuck in blocking reads or something. Come to think of it, the 2.0 proxy needs a look too. 8^)
Yes, we know some of the same ex-Rabbits. You run the mailing list, right?
This doesn't sound like a job for mod_backhand, or I'd suggest trying that, as well.
Don't worry too much about 1.3 once the bugs are fixed; 2.0 is completely different.
Regards, Chuck
On Tuesday, July 17, 2001, at 02:28 PM, Steve Barber wrote:
Chuck --
Can I ask you a question about mod_proxy?
I've got client and server programs that serialize Java objects over
HTTP. Not only that, but we push async messages from the server to the
client by having the client keep a keep-alive POST request outstanding
(with logic to re-POST whenever the connection gets killed for whatever
reason).
All this is a bit unholy to be sure, but it's a remarkably effective way
to be able to deploy complex Java apps that need the server to push
dynamic updates across the public Internet without having users worry
much about those pesky firewalls and other arbitrary corporate security
measures.
I'm having a problem when using Apache 1.3.x (I've tried 1.3.12 on
Win2k, Solaris 7, and Linux and 1.3.20 on Win2k) as an HTTP proxy server
using mod_proxy. If my client application gets terminated with extreme
prejudice, the Apache proxy keeps the server-->proxy connection intact,
even though the proxy-->client connection is long gone. Our server sends
periodic hearbeat messages on this connection; it seems like the Apache
proxy is just gleefully bit-bucketing them. I can send stuff all day
long and the "dead" connection never goes away, fooling our server into
thinking the client is still alive.
Here's the question: is this an Apache/mod_proxy bug or a feature? That
is, should the Apache proxy at some point notice that the client went
away and tear down the proxy-->server connection so that subsequent
writes by my server to the response stream fail?
I don't have this problem when I test with the iPlanet Web Proxy 3.6; it
seems to tear down the connections nicely.
Thanks if you can answer this; thanks in advance for your time in any case. Apologies in advance for not being an HTTP/keep-alive/Apache expert; I'm working on that.
-Steve Barber
P.S. I don't think we know each other, but we know a bunch of the same folks; I worked at Rabbit Software from '84-'90.
Chuck Murcko Topsail Group http://www.topsail.org/
