<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [Web-SIG] WSGI multi threading indications?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Foobar BazBaz wrote:<BR>
> I'm using wsgiref.simple_server running behind Apache.<BR>
> (Created using wsgiref.simple_server.make_server)<BR>
><BR>
> I see:<BR>
> wsgi.multiprocess is False<BR>
> wsgi.multithread is True<BR>
> wsgi.run_once is False<BR>
><BR>
> I'm surprised by the value of multithread, since it<BR>
> appears (and looking at the code seems to verify) that<BR>
> additional threads are never created; i.e. the server<BR>
> synchronously handles one request at a time.<BR>
><BR>
> Am I missing something? It there a better choice for<BR>
> an out-of-the box server to work in an WSGI<BR>
> environment?<BR>
<BR>
There's no better choice for that particular reason. ;) You'll have to manually tell any WSGI server what environment it's running in, because mod_proxy/mod_rewrite doesn't include that metadata by default. There's probably a way to send a custom header from Apache up to the WSGI server, but that would be by convention only (at this point).<BR>
<BR>
If you use mod_python (3.1 or better) instead of proxy/rewrite, you can inspect apache.mpm_query(apache.AP_MPMQ_IS_THREADED) and apache.mpm_query(apache.AP_MPMQ_IS_FORKED) as <A HREF="http://projects.amor.org/misc/wiki/ModPythonGateway">http://projects.amor.org/misc/wiki/ModPythonGateway</A> does.<BR>
<BR>
<BR>
Robert Brewer<BR>
System Architect<BR>
Amor Ministries<BR>
fumanchu@amor.org</FONT>
</P>
</BODY>
</HTML>