[egenix-users] mxODBC and Python interpreter lock

M.-A. Lemburg mal at lemburg.com
Fri Feb 28 22:55:55 CET 2003


Tommi Auvinen wrote:
> Hello.
> 
> There are quite many calls to Windows ODBC library (mxODBC for Python
> 1.5) that are not freeing the Python lock (for performance reasons, I
> guess), and now I have a strong feeling that one or more of those call
> do access (in some special cases?) the SQL Server, and if the SQL Server
> is _really_ occupied (in fact, other instance of SQL Server hogged it
> all) the Python interpreter is locked for a long time. 150 msec lock is
> the best I have managed to reproduce in my tests, but in "real life"
> there are some cases where the locking time has been tens of seconds.
> 
> Is there any risk in compiling my own version where all the calls to
> ODBC driver API do release the lock (so is performance the only reason
> not to free the lock always, or are there other caveats)? 

Only the query APIs currently free the lock. Which other APIs do you
think would also benefit from this ?

Note that you can't free the lock at arbitrary times since this
could introduce problems with callback etc.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Feb 28 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford:                                     32 days left
EuroPython 2003, Charleroi, Belgium:                       116 days left



More information about the egenix-users mailing list