the code here isn’t really showing me the nature of the two separate connections. They will be different unless you’re using “threadlocal” on the engine or pool and both are in the same thread. A simple comparison of the “raw” DBAPI connections to see if they are different objects will suffice (make sure you’re on the ultimate DBAPI connection though, not the “fairy” object). However note that Microsoft ODBC drivers also feature connection pooling, so you’d need to turn it off at the ODBC configuration level as well.
the code here isn’t really showing me the nature of the two separate connections. They will be different unless you’re using “threadlocal” on the engine or pool and both are in the same thread. A simple comparison of the “raw” DBAPI connections to see if they are different objects will suffice (make sure you’re on the ultimate DBAPI connection though, not the “fairy” object). However note that Microsoft ODBC drivers also feature connection pooling, so you’d need to turn it off at the ODBC configuration level as well.Hopefully the following details will help. Here is the sanitized code and logs:
--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
On May 12, 2014, at 2:30 PM, Sylvester Steele <sylvest...@gmail.com> wrote:the code here isn’t really showing me the nature of the two separate connections. They will be different unless you’re using “threadlocal” on the engine or pool and both are in the same thread. A simple comparison of the “raw” DBAPI connections to see if they are different objects will suffice (make sure you’re on the ultimate DBAPI connection though, not the “fairy” object). However note that Microsoft ODBC drivers also feature connection pooling, so you’d need to turn it off at the ODBC configuration level as well.Hopefully the following details will help. Here is the sanitized code and logs:well the create_engine() statement isn’t here which is really what would illustrate if you’re doing some kind of thread local thing up there. It looks a lot like your ODBC driver is pooling connections, as we see lots of pyodbc.connection objects with different identifiers, but yet it says the connection is busy with other results, additionally we see that you have a cursor local to select() yet some kind of error is being raised lots which illustrates continuous “connection closed” issues.so same answer, look to see that you don’t have anything thread local on your engine and look that you don’t have pooling in your ODBC driver turned on.
ODBC connection pooling setting did not matter. After the above change, code is running in both cases (ODBC connection pooling on or pooling off).Let me know if this is an issue and you need more info.
--
You received this message because you are subscribed to a topic in the Google Groups "sqlalchemy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sqlalchemy/hRyAeD0xWv0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sqlalchemy+...@googlegroups.com.