I've been testing out ZEORaid and it seems to work fine in itself, but  
ZODB client connections seem to be getting into a ClientDisconnected  
state and never getting out. Zope has a main ZEORaid to connect to and  
several fallbacks. Most of the time when it's connection is dropped it  
switch to checking it's backups. However sometimes I'll get a log  
trace like this.

2010-05-24T17:35:28 WARNING ZEO.zrpc (30496) CW: error connecting to  
('x.x.x.188', 8323): ECONNREFUSED
2010-05-24T17:35:28 INFO ZEO.ClientStorage (30496) Testing connection  
<ManagedClientConnection ('x.x.x.186', 8321)>
2010-05-24T17:35:56 ERROR ZODB.Connection Couldn't load state for 0x36df
   raise ClientDisconnected()

It looks like a transaction has started while the ZEOClient is still  
verifying the connection and this causes the ClientDisconnected error.  
This would be fine except that it never seems to retry again.

Looking at the code my reading is that this behaviour is by design.

--- http://svn.zope.org/ZODB/trunk/src/ZEO/zrpc/client.py ---
class ConnectThread(threading.Thread):
"""Thread that tries to connect to server given one or more addresses.  
The thread is passed a ConnectionManager and the manager's client as  
arguments. It calls testConnection() on the client when a socket  
connects; that should return 1 or 0 indicating whether this is a  
preferred or a fallback connection. It may also raise an exception, in  
which case the connection is abandoned.

Is there any good reason not to retry connecting?

Dylan Jay
Plone Solutions Manager. www.pretaweb.com
P +612 80819071   M +61421477460
skype - dylan_jay    twitter - djay75

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to