[Zope-DB] DCOracle2: close connection doesn't
Matthew T. Kromer
matt at zope.com
Mon Sep 22 16:02:05 EDT 2003
Chris Withers wrote:
>
> Not sure what you mean. If I push the close button on the DA object,
> it says it's 'closed'. In that state, I wouldn't expect a transaction
> to re-open it, but if it did, I'd expect the DA's state to change to
> 'open'. That doesn't appear to happen ;-)
DA's auto-open when they're used.
> Also, I've had off-list reports of DCOracle2 keeping references to the
> session even once it's connection has been closed. The specific report
> is that the cursor carries on working even after you call db.close()
> What kind of effect would that have here?
Bo Maryniuck thinks that you can just patch the ZOracleDA close to close
the default cursor as well when the connection closes and that should
stop leaks.
The DA doesn't keep track of what cursors its handed out (it would be
tricky) and cursors have a reference to their parent connection. The
parent connection doesn't know what cursors use it. There's code there
to say "nuh-uh, I'm closed" when a cursor operation is attempted on a
closed connection, but the cursor is still present and chewing up Oracle
resources until its closed. If you use the C layer directly (no one
does!) you also have to destroy all ResultSet objects as well.
>
> The same email also had reports of ZOracleDA leaking oracle
> connections, have you experienced anything like that?
>
>> Hmm I though I had fixed that tracker, but new zope org is
>> frustrating to deal with =/
>
>
> Glad to see it's not only us non-paying customers who love NZO so much
> ;-)
> Any joy fixing it?
Erm, no.
>
> cheers,
>
> Chris
>
--
Matt Kromer
Zope Corporation http://www.zope.com/
More information about the Zope-DB
mailing list