[Zope-DB] [Weakness] excessive demand on database connections

T. Muddletin x@Vex.Net
Tue, 11 Mar 2003 01:51:29 -0500


Dieter wrote on Monday, March 10, 2003, 4:49:21 PM:
> DA instances derived from "Shared.DC.ZRDB.Connection" are very
> eager to open a database connection:

Thanks for submitting this "bug". It's been "bugging" me quite a bit
lately as well.

Took me a long time to realise the "Connect Immediately" checkbox on
the adaptor properties didn't actually affect the start up DB
connections... but only controls whether the db connects immediately
when creating/updating the object. So basically its only use is to
allow me to create/update DB connection objects with bogus login
information without causing an error by trying to connect... which I
do sometimes, to prevent those connections (not wanting to completely
delete them) from ever connecting until I need them (at which time i
have to go fix the host or login name in the connection string).

Another thing I'd love to see is DB connection timeouts... so that if
a DB connection isn't used for some period of time it closes itself. I
have know idea whether Zope ever looks at the connection states except
when hey are accessed, but it would be nice. Why should some odd
little used connections take up resources forever and ever...
unfortunately my db server doesn't support idle timeouts either.

-- 
Tim Middleton | Cain Gang Ltd | I'd ha' been a better man all my life if
x@veX.net     | www.Vex.Net   | I'd known there were things like this. (CSL)