Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

mysqldbda bloats zodb

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


agroszer at gmail

May 5, 2008, 9:57 AM

Post #1 of 2 (66 views)
Permalink
mysqldbda bloats zodb

Hello,

I'm digging again around rdb and friends.

It seems now that mysqldbda bloats zodb in
def _connection_factory(self):
"""Create a MySQLdb DBI connection based on the DSN"""
...
self.__stringConverter = MySQLStringConverter(self.getEncoding())
return connection
on almost every request of us. That causes plenty of conflict errors I
guess. But strangely we end up with
ConnectionStateError: Shouldn't load state for 0x24 when the connection is closed
(0x24 is the MySQLdbAdapter instance)

So, I would move the assignment of __stringConverter to setEncoding
where it belongs. (Change it only when the encoding changes).
This seems to solve the above errors.

Any objections?

--
Best regards,
Adam GROSZER mailto:agroszer[at]gmail.com
--
Quote of the day:
The work will wait while you show the child the rainbow, but the rainbow won't wait while you do the work.
- Patricia Clafford

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


agroszer at gmail

May 6, 2008, 4:10 AM

Post #2 of 2 (52 views)
Permalink
Re: mysqldbda bloats zodb [In reply to]

Silence is consent.
Fix is ready and tested. I'll go ahead and fix this.

Monday, May 5, 2008, 6:57:24 PM, you wrote:

AG> Hello,

AG> I'm digging again around rdb and friends.

AG> It seems now that mysqldbda bloats zodb in
AG> def _connection_factory(self):
AG> """Create a MySQLdb DBI connection based on the DSN"""
AG> ...
AG> self.__stringConverter =
AG> MySQLStringConverter(self.getEncoding())
AG> return connection
AG> on almost every request of us. That causes plenty of conflict errors I
AG> guess. But strangely we end up with
AG> ConnectionStateError: Shouldn't load state for 0x24 when the connection is closed
AG> (0x24 is the MySQLdbAdapter instance)

AG> So, I would move the assignment of __stringConverter to setEncoding
AG> where it belongs. (Change it only when the encoding changes).
AG> This seems to solve the above errors.

AG> Any objections?



--
Best regards,
Adam GROSZER mailto:agroszer[at]gmail.com
--
Quote of the day:
A professor is one who talks in someone else's sleep.

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.