[orm-devel] Re: Losing connections...
Diedrich Vorberg
diedrich@tux4web.de
Fri, 22 Nov 2002 17:28:08 +0100
Hi Mike,
>Here's a snippet from the Zope-psycopg adapter:
> except psycopg.Error, err:
> failures = failures + 1
> if (failures > 1000):
> failures = 0
> try:
> del c ; del self.db
> self.db = self.connect(self.connection)
> except:
> raise sys.exc_type, sys.exc_value, sys.exc_traceback
> return self.query(query_string, max_rows)
> else:
> raise sys.exc_type, sys.exc_value, sys.exc_traceback
implemented. Please check out the latest version from cvs and try it
out. It went to the basic sanity tests in doc/examples but I don't
have a setup here to do benchmarking.
Diedrich
--
_..._ Diedrich Vorberg
.' '.
/ _ _ \ http://www.tux4web.de
| (o)_(o) | info@tux4web.de
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/
'---` `---`