My testing of remote mssql is proceeding nicely, or was until a few days ago. After much debugging it looks like my database proxy server may be running out of worker threads: it uses one for each cursor. My traces show that, when running the test suite in django-mssql (using ./manage.py test) cursors are neither re-used, nor closed. My verbose trace shows, for each new test class, a connection is created, a cursor is created, one SQL statement is run, another cursor is created, another SQL statement run, etc., until the test completes. Then the connection is closed, which (inside my adapter) triggers the closing of all of those cursors, sometimes a dozen or more.
I assumed that my adapter was at fault, and have gone looking for where, in other adapters, they check for re-use of the cursor, or close it. I have not been able to find anything. The idea of re-using connections in 1.6 causes me to _really_ worry. Is this behaviour expected but only happens in testing? Surely a production server does not do this. Can some kind person point me to some back end example code where in says "close the cursor here" or "find the already open cursor"? A module name and line number (or text search reference) would be wonderful. I am starting to panic. -- Vernon Cole -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
