perlbal(reverse proxy role) timing out for slow 'reproxy' backends

Hemant Bist hemantbist at gmail.com
Tue Sep 18 02:46:26 UTC 2007


Hi Dormando,

Really appreciate your reply.

In this case, the 'slow server' is a cgi script, so I guess the connection
from Perlbal to the slow server will not have http  Connection:keep-alive
header.
And the cgi script does start sending the data within  first few seconds and
keeps on sending the data.

If you think I should NOT be receiving the timeout, please do let me know. I
will try to debug it more.

 On my system, I could reproduce/fix the problem repeatedly by changing
max_idle_time(where you mentioned) and restarting perlbal.(Also if I hit the
url to the slow server directly taking out the perlbal from the equation,
things work fine).


[ The reason I updated the max_idle time because I saw  'keep_alive'
parameter  is only updated  in the ClientHTTPBase::event_write.
So my "theory" was that perlbal will kill the connection to backend slow
proxy after 30 sec through Socket::_do_cleanup() function.
event_write will not be called because Perbal will have nothing to write to
the slow proxy after it has sent the get request.

]



Thanx,
HB

On 9/17/07, dormando <dormando at rydia.net> wrote:I

> If this is the code you edited:
>
> # FIXME: let this be configurable?
> sub max_idle_time { 30; }
>
> ... then likely, yes.
>
> The latest SVN tree has the configurable 'persist_client_timeout'
> merged. That only appears to affect the keep alives though? If your
> server's taking a long time to initially start feeding data back to the
> client, and you've already established a keepalive connection, this will
> matter.
>
> -Dormando
>
> Hemant Bist wrote:
> > Hi, I have perlbal running in reverse proxy role. I have a case, where
> > the backend mod_perl servers redirect the the perlbal (via X-REPROXY-URL
> > header)  to a server that takes around 2 min to serve all the
> > data to the browser. I am consistenly getting timeout in less than min
> > in such case.
> >
> >
> > Changing the max_idle_time in ClientHTTPBase.pm to return 180 seems to
> > fix the problem for me. (But I am not sure if it also increases the
> > timeout for the persistent browser connections to 180 sec)
> >
> > Is this a known bug/behaviour. Or something that I only I am noticing.
> >
> > I see a patch from Justin to configure the timeout per service  in this
> > list(http://lists.danga.com/pipermail/perlbal/2007-June/000518.html ).
> >  Is it to workaround this bug?
> >
> > Thanx,
> > HB
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/perlbal/attachments/20070917/44a6ab50/attachment.html


More information about the perlbal mailing list