--On December 6, 2005 3:57:37 PM -0500 Brian Akins <[EMAIL PROTECTED]>
wrote:
Can we vote on it as is? It fixes the problem, we can make it "pretty"
later. Of course, if someone has a better solution right now...
I just reproduced the problem with the following setup:
1) On 8080, httpd trunk / disk cache / proxy pass of /proxy to 8081
2) On 8081, httpd 1.3.x with a CGI script that writes a bit, flushes,
sleeps for 30 seconds, and then prints another bit of data.
Fixes are in trunk as of r354628, r354630. (Brian: you probably only need
r354628.)
To reproduce, the 30 second window gives the ability to shut the server
down while the response is pending - so this is easy to track down.
With these changes, we'll send out the terminating 0 chunk and then close
the connection. I haven't checked to see what we'll do for a C-L body, but
I expect we'll just close the connection.
This also flagged a problem with the ap_http_input_filter in that when it's
waiting for a chunked line and it gets a 0/EOF response (other socket
closed) off its blocking read, it then assumes that chunk line is zero -
meaning the body is terminated. That's not right, but it's not terribly
harmful - except for this corner case. If we fix that to propogate the
error upwards (see r354630), then...
The patches to mod_proxy_http we identified here on list do indeed work and
are in as r354628.
With both of these patches, the disk cache filter will remove the errored
out headers/bodies when the connection fails.
The only thing that I'm seeing is that after I do this, mod_proxy refuses
to reconnect to the server. I see messages in the error log as:
[Tue Dec 06 15:59:41 2005] [error] (61)Connection refused: proxy: HTTP:
attempt to connect to 127.0.0.1:8081 (127.0.0.1) failed
[Tue Dec 06 15:59:41 2005] [error] ap_proxy_connect_backend disabling
worker for (127.0.0.1)
IMHO, it shouldn't be so quick to disable the worker entirely. I don't
know if this is the problem that Jim's flagging or not. It really should
keep trying. I'll leave that for someone else to fix - but, it'd probably
need to be fixed before 2.2.1 can be considered.
I'd like to add 'convert proxy to use provider' as on the 2.4/3.0/GREEN/X
todo list. The whole maze of hooks and junk is just utterly confusing to
no real purpose. -- justin