[mod_python] threading issue on win2k

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Sep 20 22:52:28 EST 2001


The problem may be with the odbc driver.

I don't know about this particular one (sybase), but I know that some of
the very latest m$ access and sql server odbc drivers are still not thread
safe.

The link below seems to be confirming my theory:

http://groups.google.com/groups?hl=en&selm=397EE72C.3AC8E5DE%40ever.ever

Grisha

On Tue, 18 Sep 2001, [iso-8859-1] FranГois Lepoutre wrote:

> Hi all,
>
> Just a few words to say that i discovered python and mod_python a few months ago.
>
> Developping with these tools has been one of my greatest programming
> pleasure (the previous was smalltalk a century ago...).
>
> However I have a nasty pb to solve which seems to be windows-specific and
> related to windows threading.
>
> The configuration:
> - W2000 server,
> - python 2.1 + mxodbc,
> - apache 1.3.20
> - mod_python 2.7.4 for 2.1
>
> Under heavy loads, the the code sequence that load odbc information
> from the db engine (ASA by sybase) seems to break because of
> thread concurrency.
>
> The apache just breaks with log message:
> "c:\python21\lib\mod_python\apache.py", line 193, in Dispatch
>  result=object(req)
> IOError: Write failed, client closed connexion
>
> When putting apache "ThreadPerChild" to 1 instead of 2 to 50,
> the pb vanishes... and performance as well. (:
>
> I'd like to know whether the pb is:
> - apache related (is apache 2/win a potential cure?)
> - python-related (can we improve our scripts with thread-caring code?)
> - modpython-related (should we try to tweak apache.py?)
>
> I know next to nothing to low-level os issues threads except that they
> tend to get in the way of interperters like python...
>
> Thanks in advance for any piece of advice.
>
> FranГois
>
>
>
>




More information about the Mod_python mailing list