[Zope-DB] MySQL/Postgres DA's leak sessions?

Chris Withers chrisw at simplistix.co.uk
Thu Oct 23 09:19:42 EDT 2003


Bo M. Maryniuck wrote:

> 
> Hope, no. Well, connection uses volatile attributes. This means, that when you 
> remove the connector, it still present in _v_attribute 

Well, it's not present in the _v_ attribute if you delete it, but from some of 
your other posts, it would appear that deleting the _v_ attribute just orphans 
rather than closes the connection, right?

> somewhy (that's other 
> good question: sharing between threads, etc)

How does sharing between threads come into this?

> and sometimes even flushing the 
> cache can not help.

When is this the case?

> Other big caveat (and dozen workarounds to get those gotchas) is a ZODB vs. 
> Oracle transaction machinery. This still does not works for me as I want, 
> since each commit to ZODB is after each REQUEST.

I'm afraid I'm happy with a mapping to one Oracle transaction to one ZODB 
transaction, including the way Zope handles ZODB transactions, so I can't help 
with this...

>>Don't quite understand what you're saying. Are you saying the latest CVS
>>ZOracleDA still leaks Oracle sessions?
> 
> Well, not ZOracleDA, but whole approach. I guess other DB also suffer the same 
> problem. At least I am sure for PostgreSQL.

That would be interesting to know. Has anyone experienced MySQL or PostGres 
database adapters leaking connections in a similar way?

> You might change ZOracleDA or might not. The main change should be done in the 
> approach of DC Connection et al: DO NOT use volatile attributes for DB 
> connectors. 

Does this have any effect on the specific issue we're talking about here? 
(id(dco2) != id(dco2))

>>What Oracle SQL do you use to see what active sessions there are?
<snip>

thanks for the SQL :-)

cheers,

Chris




More information about the Zope-DB mailing list