[egenix-users] mxODBC issues with MS SQLServer, blocking question and ZODB bloat issue

M.-A. Lemburg mal at egenix.com
Tue Sep 19 15:00:48 CEST 2006


Ivo van der Wijk wrote:
> On 9/19/06, M.-A. Lemburg <mal at egenix.com> wrote:
>>
>> It is possible that the ODBC driver you are using locks
>> up the thread. Could you enable ODBC tracing in the ODBC manager
>> to see where the lockups occur ?
>>
> 
> I will try this once I'm onsite at the customer again, I can't access
> the systems externally.
> 
>> mxODBC releases the Python thread lock for most ODBC calls.
>> However it is possible that the ODBC driver implementation
>> does some I/O in places where you'd normally not expect this
>> to happen.
>>
>> If the driver locks up in one of the calls which
>> don't release the thread lock, then you end up with a
>> blocked Python interpreter.
>>
>> Which ODBC driver are you using to access SQL Server ?
>>
> 
> unixODBC currently, and we're experimenting with iODBC (or do you mean
> something else? I'm a bit confused about the entire chain of software
> involved :)

I meant the ODBC driver which is registered with the ODBC
manager. Choosing the right ODBC driver usually makes a
big difference in terms of stability, performance and
robustness.

The typical ODBC stack looks like this:

  Python Application
          |
       mxODBC
          |
     ODBC Manager (Windows/Mac OS X ODBC Manager, unixODBC, iODBC)
          |
     ODBC Driver (for SQL Server, Oracle, DB2, MySQL, etc.)
          |
       Network
          |
   Database Server (SQL Server, Oracle, DB2, MySQL, etc.)

mxODBC can also be linked directly against the ODBC driver,
but we usually recommend to use an ODBC manager for setting
up the link to the database as these are easier to setup
and configure.

>> > Additionally, I would like to know if there is any way to have a
>> > timeout set on the max. duration of a query through mxODBC.
>>
>> If the driver supports such timeouts, you can provide such a
>> timeout in the connection string. mxODBC itself doesn't have
>> a way to enforce a timeout because the ODBC driver is in
>> charge of the networking between the client and server.
>>
> 
> Ok, will try that.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Sep 19 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the egenix-users mailing list