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:
'SQLConn
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 o
How many ObjectStore objects do you have living? I believe you are only supposed to have one instance for your entire application. I had a lot of trouble with running out of connections when I first started using MiddleKit, and as I recall I fixed it by making a global MySQLObjectStore instance.
I think this creates another problem. A new connection/cursor is
created for every object that is stored when you call
"store.saveChanges()".
If my mysql max_connections variable is less than the number of
objects I have to commit, I'll get an exception like this:
Traceback (most recent call las
Actually I think it was a change in the MySQLdb API. I believe that
insert_id() moved from the cursor object to the connection object in the
latest versions.
I've fixed it either by installing an older version of MySQLdb or by
editing MySQLObjectStore.py to:
def retrieveLastInsertId(self, conn, c
Hi,
I was just trying out middlekit for the first time and ran into a
problem. I was following the quick start guide and when I tried
running the code with "store.saveChanges()" in main, I get this error:
$ ./main.py
Traceback (most recent call last):
File "./main.py", line 31, in ?
main(