It sounds like you are traveling down the exact same path I went down a few weeks ago ;) I was getting a similar MySQL "max connections exceeded" error as well. The fix for me was to configure MiddleKit to use an SQL connection pool. In your model's Settings.config file add the following:
'SQLConnectionPoolSize': 20 http://www.webwareforpython.org/Webware/MiddleKit/Docs/UsersGuide.html#Configuration -Seth On Tue, 2005-01-25 at 21:49 -0600, jacob martinson wrote: > I only have one ObjectStore object, but it will be handling > persistance for several hundred other objects. Here's the code that > was causing the problem (after I made a change to the ObjectStore code > to make it work with the newer python/mysql lib per instructions > earlier in this thread): > > import os, sys > sys.path.insert(1, os.path.abspath(os.pardir)) > > from mx.DateTime import DateFrom > from MiddleKit.Run.MySQLObjectStore import MySQLObjectStore > from NetSession import NetSession > > def main(): > # Set up the store > store = MySQLObjectStore(user='', passwd='') > store.readModelFileNamed('proto1.mkmodel') > > for x in range(1,255): > s = NetSession() > s.setUserId(x) > store.addObject(s) > > store.saveChanges() > > if __name__=='__main__': > main() > > Thanks! > -jacob ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss