Expanding the recent discussion on DBPool, I tried to implement this on my
site (http://memigo.com/) which does a lot of very heavy MySQL lifting
--thus I need all the DB speed-up DBPool can give. DBPool seemed to be
saturating the MySQL daemon and I had to go back to the old config.
Let me see if I can explain what's happening. The various page classes
include an instance variable (or >1), self.store that itself is an instance
of a Store class. I have two versions of Store:
Version 1 instantiates a single connection in the Store.py module and passes
it to Store and its subclasses:
(Store.py:)
_conx = MySQLdb.Connection(...)
class Store:
def __init__(self):
self.conx = _conx
Version 2 creates a DBPool at the module level and then Store asks for a
connection:
(Store.py:)
dbPool = DBPool.DBPool(...)
class Store:
def __init__(self):
self.conx = dbPool.getConnection()
Now, V.1 is what I used to have and it worked fine (but slowly) most of the
time, except under very heavy loads. Trying to help the heavly load
situation, I implemented V.2 instead. However, after a short little test
drive, V.2 was flooding MySQL (I kept getting "Too many connections"
errors).
Any ideas? I have to admit that the DBPool situation is confusing me...
Thanks,
Costas
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss