I have a special situation where I need to
programatically minimize the zodb connection cache.
When I do that, the volatile
ZRDB.Connection._v_database_connection property gets
killed, but the DB instance doesn't get it's self.db
garbage collected, and thus the connection is lost forever.
This becomes a problem when you do new connections,
because there is a limit (in my case 100, dunno if it's
configurable, but that's not important for this matter)
of concurrent connections to the mysql server.
So my solution was to call close() on the db connection
but it fails to close the connection to the server
because there is no close() method in db.py. I patched
my instalations by adding:
def close (self): del self.db self.db = None
to the DB class in db.py
I don't know if there is a more elegant way, but this
one works :)
Could you find a way to put this on for the next release?
Logged In: YES
user_id=71372
Your patch, or a variation, has been applied to the current CVS tree.