[Zope-DB] SQL Relay and _v_ variables

Chris Withers chrisw at simplistix.co.uk
Wed Oct 29 06:11:59 EST 2003

Dieter Maurer wrote:

> However, the DA must be very careful to not open a second connection
> to the same database within the same request. Otherwise, what
> should be one transaction may become several independent ones.
> This can lead to various obscure failures (e.g. database inconsistencies).

Indeed, this is why you suggested that if the connection goes away, a 
ConflictError of some sort should be raised, so that Zope retries the request, 
Where is the code which actually does this?

>  > This mirrors the pathalogical ZOracleDA case, except that it doesn't leak 
>  > connections as far as anyone has commented ;-)
> "ZOracleDA" does *not* open/close the connection per request...

It does if the DA object is dumped from the ZODB cache every request, which is 
the pathological case (where the ZODB cache size is way to low) I was refering to.

>  > Who's using SQL Relay under high load with lots of database adapters in production?
> We used it to connect from Linux/Solaris to an MS-SQL Server on Windows.
> It became too slow when large amounts of data had to be transfered
> from the database to the client. In this case,
> "SQLRelay --> FreeTDS --> SQL-Server" was an order
> of magnitude slower than "Sybase-DB-Api --> FreeTDS --> SQL-Server".

Interesting, thanks for the data point :-)



More information about the Zope-DB mailing list