write_event called very infrequently during reproxy, causing lots of perlbal_timeouts

Brad Fitzpatrick brad at danga.com
Mon Jan 22 20:57:21 UTC 2007


Quite likely.... good find!  I'll look into this...



On Mon, 22 Jan 2007, Eric Lambrecht wrote:

> We had an issue here where numerous downloads that perlbal was proxying
> out to our users (from mogile, *natch*) were getting cut off for some
> reason.
>
> After turning on debugging, it appears the 'alive_time' field in
> Perlbal::Socket wasn't being updated, and so the ClientProxy object was
> being closed by the Socket::_do_cleanup() idle socket closer.
>
> I see that 'alive_time' should be updated every time
> ClientProxy::event_write() is called, but when I turn on debugging I
> find that that method gets called very rarely while reproxying files. It
> happens so rarely that 'alive_time' doesn't get updated every 30
> seconds, _do_cleanup closes the socket, and our downloads get cut off.
>
> I hacked together a solution by writing a Perlbal::Socket::write()
> method that updates alive_time before calling Danga::Socket::write(),
> and that seems to solve things, but I'm not certain it is correct (does
> just writing to the socket imply it is still alive?).
>
> Anybody else ever experience this problem?
>
> Eric...
>
>


More information about the perlbal mailing list