Saga continues ([Zope-DB] DCOracle2: close connection doesn't)
dieter at handshake.de
Tue Sep 30 14:47:15 EDT 2003
Bo M. Maryniuck wrote at 2003-9-30 10:12 +0200:
> OK. Let's go step-by-step through very basic and simple test to get know what
> can keep *Oracle* session alive and you just track here and put comments
> below where is wrong way, ok? Thank you.
> Let's go:
> 1. I have self._v_test = None variable in __init__(). The empty one.
> 2. Now I call self._v_test = DCOracle2.connect('XXX/XXX at XXX')
> 3. So I see (in Oracle) new session created for 'XXX' user.
> 4. In pure Python, I call (basically) self._v_test.close() and then
> Oracle session disappears immediately. Here I call it in the same way.
> 5. Voila. Oracle session disappeared either.
Thus, this works as it should do...
> But if I do the same thing several times (10-50), I see that some of the
> sessions are present and NOT closed.
> After I click on Cache button "Minimize"
> it disappears.
This indicates that sometimes "close" is not called...
> So how to explain it? Why one time it disappeared, other time
> -- not?
I can not give you the answer to this.
If your steps above are executed in a single request, then
Zope did everything it could do. The problem must be elsewhere.
If you "connect" and "close" in different requests,
then you may be tricked by Zope's ZODB connection pool.
Successive requests need not get the same connection.
More information about the Zope-DB