setting request timeout in mod_proxy/mod_proxy_balancer
Hi All: As I point out in: http://mail-archives.apache.org/mod_mbox/httpd-users/200701.mbox/raw/[EMAIL PROTECTED] I'm trying to set a request timeout. Sniffing around de source, I saw that ap_proxy_http_process_response() (mod_proxy_http.c) calls ap_getline() where is blocking, I think. Getting deeper I think that "apr_bucket_read" macro is beeing 'called' in a blocking fashion (APR_BLOCK_READ). I'm not aware about Apache API, buckets, brigades and so on but I'd like to know if it's so dificult to implement this call as nonblocking and setting a timeout. If the answer is 'no', anybody can show me a way to implement this feature, so I can study Apache API and try to get the job done. bests regards Lucas Brasilino
Re: setting request timeout in mod_proxy/mod_proxy_balancer
Hi > Based on your configuration from above, the following should work: No, it doesn't. I've tried yet. >From docs: '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.' My understanding is that this options set the TCP connection (SYN -> SYN+ACK -> ACK) timeout, not the HTTP response timeout. regards Lucas Brasilino > > ProxyRequests Off > > BalancerMember http://server:9080 loadfactor=1 timeout=5 > BalancerMember http://localhost:9080 loadfactor=1 timeout=5 > ProxySet lbmethod=byrequests > > ProxyPass /loadbalancer balancer://webcluster/ > ProxyPassReverse /loadbalancer balancer://webcluster/ > ProxyHTMLLogVerbose On > LogLevel Debug > > Should set the timeout to 5 seconds. Take into account that this also means > that the connection > will be closed if your backend takes more than 5 seconds to generate a > response or if there are > pauses by the backend during sending the response that last more than 5 > seconds. > > > Regards > > RĂ¼diger > > >