[mod_python] how to run multiple subinterpreters from mod_python

Mike Looijmans nlv11281 at natlab.research.philips.com
Wed Jan 24 04:56:13 EST 2007

> i made this test...
> for a url say, http://myserver/myapp/test <http://myserver/myapp/test>. 
> i put sleep in the python handler code.
> //python handler for the above url
> {
>     import time
>     log('before sleep')
>     time.sleep(60)
>     log('after sleep')
> }
> when multiple clients access the url, the calls are serialized. the 
> second client waits for a minute and then comes to this handler.
> why is this so? that's why i was lead to believe that the requests were 
> serialized.

Make sure that your test is correct. A browser will use the same 
connection for several request, in effect serializing the requests 
already. Many other HTTP client libraries do the same (which is a good 

Your best test is to open telnet sessions to port 80, and write "GET 
/test HTTP/1.0<return><return>" to the telnet session.

More information about the Mod_python mailing list