[mod_python] threading issue on win2k

François Lepoutre francoislepoutre at compuserve.com
Tue Sep 18 11:52:02 EST 2001


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20010918/5ec094da/attachment-0003.htm


More information about the Mod_python mailing list