https://issues.apache.org/bugzilla/show_bug.cgi?id=56541

--- Comment #10 from Yann Ylavic <[email protected]> ---
Created attachment 31684
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31684&action=edit
Forward (and flush) request data as soon as available (2.2.x)

The corresponding (complete) patch against 2.2.x would probably not be accepted
because of the changes on mod_proxy_http which may affect existing
configurations (although it should not, so much configurations work without it
until now).

Hence, a lightweight version of the patch is attached for 2.2.x, which will
simply disable any buffering of the request before it is forwarded to the
backend (so that there is a minimal delay between the backend connection is
established/reused and the request is sent on it).

This should prevent the backend from closing the connection because of a
timeout (the time taken by mod_proxy to pre-fetch the request).
You will have to "SetEnv proxy-flushall" to enable it.

Please note that it won't work if you SetInputFilter something, since in this
case the Content-Length might change and mod_proxy won't forward it as is (the
request will be spooled on disk).

The same applies regarding "SetEnv proxy-sendcl", it is usually needed because
one wants "Transfer-Encoding: chunked" from the client to be turned into
Content-Length (eg. the backend does not support chunked requests), but in this
case the request will also be spooled, and the patch is useless too.
So either you can #comment it, or you need the full patch (2.4.x).

Finally, there is still race condition where the backend may close a reused
connection at the same time when mod_proxy checks/thinks it is still alive.
To avoid that, you have to configure the worker's TTL (ProxyPass ...
ttl=<seconds>) with a lower value than the KeepAliveTimeout used by the
backend, so that no connection is reused if it is idle for more than TTL
seconds.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to