[Zope] Re: MySQL thread connection question
Chris Withers
chris at simplistix.co.uk
Thu Aug 19 03:07:11 EDT 2004
Dieter Maurer wrote:
> The current Zope code uses connection pooling:
Yes, it uses ZODB's connection pool, which has very different
requirements to the RDB connection pool in some common cases.
>>Yep, but rather than creating one connection for each Zope thread, it
>>only creates as many connections as are concurrently needed, and that's
>>almost always a MUCH lower number...
>
> Looks as if you close connections as fast as possible?
No, it just doesn't open them unlesss it needs them.
> You are aware that some database systems (Oracle seems to be)
> have long connection times?
Yes, which is why I don't recommend closing and opening connections all
the time ;-)
>>With a connection pool, the worst case number of connections is the
>>largest number of concurrent requests. Without one, it is the number of
>>Zope threads (plus some for those leaked by _v_ variables),
>
> There are no "_v_variable" leaks.
yeah there are, you describe them in your other mail :-)
> The current pool is not so stupid.
> When it opens n connections than the server was hit by at least
> n concurrent requests.
Not true. Zope appears to randomly select ZODB connections to use from
the available pool, default size 7...
> It is true, that not all of these
> concurrent requests need to access the database.
...but this may also be the case, I'm happy to accept clarification in
the form of line numbers in source files that do this work ;-)
>>I'd be interested to hear your thoughts on the code in ZOracleDA on the
>>branch I created...
>
> I am not so keen to participate in code reviews.
Well, that's a shame :-/
> This will change, however, when your pooling enters
> the DA core in Zope -- and our Postgres interaction
> should no longer work correctly (I use Postgres,
> colleagues fight Oracle).
Heh, why do you think it won't work correctly?
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope
mailing list