[Zope-DB] DCOracle2 and ConnectionReleasedError

Chris Withers chris at simplistix.co.uk
Fri Jul 15 15:28:28 EDT 2005


Hi there,

Maciej Wisniowski wrote:
> We are using DCOracle2 from CVS head branch, but I'm testing
> chrisw_fixconnectionleak_branch branch created by chrisw and
> I've fallen into some errors with this.

Indeed you will I'm afraid. It was a pretty big rewrite and involves 
using module-level locking to enable Zope's threads to share a pool of 
connections. It was only lightly load tested when I developed it, and 
since then, anyone who's hammered it properly has seen the errors you 
describe.

> First of all, is  chrisw_fixconnectionleak_branch branch the
> recommended one? I've seen Carsten Gerner question about the
> version of DCOracle but the answer says only about cvs version...

Take your pick: Oracle Disconnected errors or ConnectionReleasedErrors, 
all available versions have problems, and no-ones around to maintain 
them :-S

> As far as I've analyzed this I see that 'close' function is called
> somehow, but I don't know why and by what.

import pdb, pdb.set_trace() is your friend ;-)
Tha twill help you find out what is calling the close method.

> With older version of DCOracle2 (from CVS trunk) compiled with
> Oracle8 there are no errors.**

Then use that ;-)

> My Zope is 2.7.2, Python 2.3.5. Zope is running with 10 threads
> (I tried 4 but no difference) in ZEO.  DCOracle2 is compiled for
> Oracle9.

Well, you're doing well on the debug front with the print statements, 
but make sure you watch those times, threading means the time something 
prints isn't necessarilly the time something ran ;-)

If it was me, I'd drop down to one thread and see if you can reproduce. 
If not, and I suspect that will be the case, try 2 threads. Still no 
errors, try 3 and so on.

...then try and figure out what's causing it to fail and see if you can 
come up with an artificial test case.

I'm sorry I can't help more :-S I really want to maintain DCOracle2 but 
simply have no time. Matt Kromer can help with C-level bugs, but all the 
current problems are with the Python database adapter for Zope.

I was hoping that my current big project would need this, but it turns 
out it's easier just to wait until the underlying database gets moved 
onto MS SQL Server and then just use eGenix's excellent ODBC adapter.
You may even want to see if you can use that to connect to Oracle, they 
think you can ;-)

Anyway, good luck, I'm afraid you're going to need it!

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope-DB mailing list