Hmmm....

The documentation says:

   timeout      |Timeout|       Connection timeout in seconds. If not set the
   Apache will wait until the free connection is available. This
   directive is used for limiting the number of connections to the
   backend server together with |max| parameter.

Yet the discussion thread at http://marc.info/?l=apache-httpd-dev&m=117986243317037&w=2 seems to say that "timeout" on the workers will be used as a connection and/or request -- and then fallback to ProxyTimeout and finally to Timeout.

Essentially I'm looking to transform:

   <Proxy balancer://ajpWorker>
      BalancerMember ajp://localhost:8010 min=15 max=300 smax=30
   ttl=900 keepalive=Off timeout=86400
   </Proxy>

into something that will:

  1. Wait essentially indefinitely for a response from a backend Tomcat
     (e.g. up to a day 86400).
  2. Wait up to a different time period, e.g. 180 seconds, to find a
     worker rather than immediately returning a 503.

It's not at all clear to me how both are achieved in 2.2.4 and how both will be achieved "shortly" when the changes discussed in the "Re: ProxyTimeout does not work as documented" thread are backed into a 2.2.x release (or if they will be).

--
Jess Holle

Rainer Jung wrote:
As I understand mod_proxy_* and APR code, the BalancerManager timeout will set a timeout for individual read and write attempts to backend connections.

So it neither correlates to an idle timeout on the connection (see ttl and smax) neither to a request timeout in the sense of a limit to the full request handling time.

The timeout starts whenever something is expected to get read or written. So most of the times it should fire, when retrieving the initial response packets takes longer than this timeout, or your backend starts to hang in the middle of request processing.

Regards,

Rainer

Jess Holle wrote:
Currently one can specify timeout on one's BalancerMember (e.g. with mod_proxy_ajp).

Does this serve as both a connection and request timeout? If so, in the worst case I can use it to be both and thus set it for the latter (knowing it is ridiculous for the former).

I read the "Re: ProxyTimeout does not work as documented <http://marc.info/?l=apache-httpd-dev&m=117986243317037&w=2>" thread and am trying to figure out how to set connection and request timeouts for mod_proxy_ajp today with 2.2.4 -- and hopefully do so in a manner that is compatible with the resolution of this thread...

--
Jess Holle


Reply via email to