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

Chris Withers chrisw at simplistix.co.uk
Thu Oct 23 09:47:45 EDT 2003


Bo M. Maryniuck wrote:

> On Wednesday 22 October 2003 22:44, Chris Withers wrote:
> 
>>- leaking of Oracle connections/sockets. This seems to be fixed by emptying
>>the ZODB cache, which feels a lot like a Zope/ZOracleDA/DCOracle2 bug to
>>me.
> 
> Yeah, cool "fix" enough: it also "fixes" out all else cached 

Indeed...

> and *NEEDED* 
> working objects... :-(

What do you mean by 'needed' here?

> No. It should reconnect when Zope knows that there is NO database connection 
> while you __call__ stuff. But the problem is, that the 
> self._v_database_connection attribute IS present and NOT None, since it still 
> thinks Oracle is present. Just there simply is no such mechanism to get it 
> know.

Well, it could catch the exception oracle throws and re-connect, surely?

>>- Zope hangs due to Oracle servers not responding. Something somewhere
>>should be timing out and it ain't currently ;-)
> 
> This "something" is called "socket". And only Python 2.3 has socket timeout. 

I would have thought the socket level was handled by the Oracle client 
interface, how is this not the case?

> All else you need to subclass it and use Thread and Timer from thread* 
> module. Other thing is that timeouts SHOULD be workarounded, but I think they 
> will just cause a Traceback. :(

In this last case, a traceback is the correct response. The problem I'm looking 
to prevent is an entire Zope site becoming unavailable (most of which is served 
from ZODB) because the Oracle server has fallen over...

> Me. That's why I complain a lot on whole DC Connection approach.

Well, I have time to work on this, so if you and Matt can help me out with ideas 
for the 'right' approach, I'd like to make it work...

Chris




More information about the Zope-DB mailing list