What is the recommended way to recover from a db connection that is
held by a Psycopgda adapter instance? If for some reason postgres
goes down, I get the following error:

  File 
"/var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py", line 
83, in _runWithConnection
    val = meth(conn, *args)
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.8dev_r1814-py2.4.egg/sqlobject/dbconnection.p
 ", line 351, in _queryOne
    self._executeRetry(conn, c, s)
  File 
"/var/lib/zope3/instances/instance.barry2007/lib/python/sqlos/adapter.py", line 
77, in _executeRetry
    raise DatabaseException(str(exc.args))
  DatabaseException: ('no connection to the server\n',).

I then have no recourse but to restart the zope server. In the Java
world one would put a try/catch around the the SQL operation and
attempt a reconnect, but I am wondering if there is a better way
(read: automatic recovery) in a z3 world.

-- 
Thanks,
Roy Mathew.
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to