Saga continues ([Zope-DB] DCOracle2: close connection doesn't)

Chris Withers chrisw at
Thu Oct 23 09:38:01 EDT 2003

Bo M. Maryniuck wrote:

> On Wednesday 22 October 2003 23:48, Chris Withers wrote:
>>What size is your ZODB object cache? If the DA object goes out of the
>>cache, the connection will be dropped. I think that's why the code is there
>>in __setstate__...
> But that sucks in principle.

Well, not really. That can only happen at ZODB transaction boundaries, and I 
don't know how you'd get ZSQL methods to span more than one request since I can 
think of many reasons why that would be bad.

So, the worst case would be opening a connection at the start of every 
transaction. Now, you'd be wanting to sort out your ZODB cache size for many 
other reasons if that was the case, but, provided no Oracle connections are 
leaked, I don't see there's anything that bad, even with this pathalogical case.

However, it appears that DCOracle2 or ZOracleDA DOES leak connections/sockets. 
Ironically, in the case I'm considering, these can be reclaimed by clearing the 
ZODB cache, so the pathological cache thrashing example above would actually 
make sure that problem never arose...

But you suggest that it is being removed from that cache that leaks 
connections/sockets in your case.

Can you confirm this?


More information about the Zope-DB mailing list