[Zope-DB] Closing idle DCoracle2 Connections?
carsten.germer at desy.de
Mon Oct 24 07:32:42 EDT 2005
Ok, that's a bit much for my question I guess...
I gather from all your mails that I can not "close" a database
connection periodically or on event from Zope (Script or whatever)?
Any hands-down clues what I can do to prevent db-conns from ideling
>From: Dieter Maurer [mailto:dieter at handshake.de]
>Sent: Saturday, October 22, 2005 8:07 PM
>To: Matthew T. Kromer
>Cc: Chris Withers; Germer, Carsten; zope-db at zope.org
>Subject: Re: [Zope-DB] Closing idle DCoracle2 Connections?
>Matthew T. Kromer wrote at 2005-10-21 20:39 -0400:
>>What happens with Zope and DCOracle2 I think is when the DA
>>connection object is ghosted, it doesn't know about it, and thus
>>doesn't close its connection.
> When the DA instance is ghosted, the "db" object is deleted
> (last reference released).
> In an optimal world, the deletion of the "db" object would release
> the last reference to the DCOracle connection and this
> would close the connection to Oracle before the memory
> is released.
>>The close is implicit when the
>>connection object is destroyed, but usually there's so much stuff
>>loaded that *someone* has a reference to the connection.
>That's the bug.
>There should be no references to DCOracle resources outside
>the "db" object (at least, Zope's DA/ZSQL do not require
>such references outside). Thus, when the "db" object goes away,
>the "DCOracle" resources should, too.
>>However, the code is still geared around OCI8 and some Oracle
>>its due for some refactoring in a big way to deal with the profusion
>>of handle-driven objects now much more prevalent in Oracle 10.
More information about the Zope-DB