Hi-
I had a quick question about the MySQLObjectStore in
Middlekit. Is there a 'close()' or some other such
method that I am missing out on? I think the
'persistent store' is a little too persistent.
Whenever I call MySQLObjectStore.fetchObjectsOfClass()
a connection is opened to MySQL that performs it's
operation then sleeps. The connection doesn't go away
until termination of the entire program. I am trying
to execute something like
for item in list
results = store.fetchObjectsOfClass('a',
clauses="WHERE field='%s'" % strIndexname);
And I get the following error as MySQL rapidly fills
up with sleeping connections, presumably one opened
for each time through the for loop:
File ".\MiddleKit\Run\MySQLObjectStore.py", line 33,
in newConnection
File
"C:\Python22\Lib\site-packages\MySQLdb\__init__.py",
line 63, in Connect
return apply(Connection, args, kwargs)
File
"C:\Python22\Lib\site-packages\MySQLdb\connections.py",
line 115, in __init__
self._make_connection(args, kwargs2)
File
"C:\Python22\Lib\site-packages\MySQLdb\connections.py",
line 41, in _make_connection
apply(super(ConnectionBase, self).__init__, args,
kwargs)
OperationalError: (1040, 'Too many connections')
I am using Webware 0.7 and MySQL 3.23-NT
Any help would be greatly appreciated. Thanks,
-Jeff
P.S. this problem is even worse when using WinPython.
The sleeping connections to MySQL don't go away even
after the python program has completely executed,
closing WinPython is the only way to get MySQL to
release the sleeping connections.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss