[Twisted-Python] Missing feature in detecting stalled PB connections?

Itamar Shtull-Trauring itamar at itamarst.org
Tue Feb 21 11:06:03 EST 2006

On Mon, 2006-02-20 at 15:02 +0100, Luc Stepniewski wrote:

> I know I could add a timer (callLater) that would wake up and kill the 
> connection after some time (because I know one transaction will not exceed 
> some precise time), but it's really really trashy, and one not always knows 
> what will be the duration of the transaction.
> Is there really no other alternative to detect the correct connection to 
> another PB instance?

The typical way to do this is have some sort of remote_ping method that
returns immediately on the server (or on the client) that the client (or
the server) calls every once in a while, with a timeout for the
response. If that times out the problem is likely the connection, not
the server being slow, in which case you can close the connection.

More information about the Twisted-Python mailing list