[ZODB-Dev] [Danger] "ZEOClientStorage" does not detect lost
ZEOconnection
Dieter Maurer
dieter at handshake.de
Tue Jun 28 12:49:29 EDT 2005
Tim Peters wrote at 2005-6-27 15:38 -0400:
> ...
[Dieter]
>> Probably, "ZEOClientStorage" (and the ZEO server) should use
>> "SO_KEEPALIVE" to enable TCP keepalive messages. However, the default
>> TCP timeouts are probably too high (2 hours) for many ZODB applications
>> (like ours).
[Tim]
>Section 4.2.3.6 of RFC 1122 doesn't read like it thinks keep-alives are
>either portable or appropriate for this. In particular,
>
> It is extremely important to remember that ACK segments that
> contain no data are not reliably transmitted by TCP.
> Consequently, if a keep-alive mechanism is implemented it
> MUST NOT interpret failure to respond to any specific probe
> as a dead connection.
[Dieter]
Then hopefully, TCP knows that and observes it in the
implementation of its "keep-alive" mechanism.
At least, it is quite careful (with Linux default parameters):
Only after 9 keep alive messages are lost, the connection is
considered broken.
>...
[Dieter]
>> I will implement an application specific keep alive mechanism.
[Tim]
>How will you do that?
I attach the script (wrapped up as a Zope "product").
> Would it be appropriate for ZEO to do something
>similar itself?
Yes. It would be very nice.
> If ZEO did, would you still need to bother?
No.
And I would be happy, because I am using internal
undocumented implementation details that already once
changed between ZEO releases.
--
Dieter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __init__.py
Type: text/x-python
Size: 2802 bytes
Desc: ZEO Keepalive script
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20050628/ac57bb84/__init__.py
More information about the ZODB-Dev
mailing list