[Zope-dev] Making a ZSQL.DA fully multi-threaded?

Chris Withers chris at simplistix.co.uk
Wed Jul 21 11:44:27 EDT 2004


Brad Clements wrote:
>>>I have set the SAPDB timeout to 32400 seconds.
>>
>>Unless you have an extremely heavily loaded Zope, that's too low, and may
>>be causing you problems...
> 
> That is the maximum allowed value in dbmgui.

My point is that unless you implement a connection pool model independent of 
Zope's threading, you WILL run into problems if you have ANY kind of timeout 
where the DA isn't smnart enough to reconnect connections that have closed...

> Anyway, after setting Zope to be single threaded, I have not had any segfaults.

Tada: You made sure that one connection will get used and you won't get stale 
ones being timed out and then randomly selected for use at some later point ;-)

Get rid of the connection timeouts, and you should be fine for multi-threaded Zope.

Either that or restructure the DA like I did for ZOracleDA ;-)

Chris

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



More information about the Zope-Dev mailing list