<!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>
&gt; I'm using wsgiref.simple_server running behind Apache.<BR>
&gt; (Created using wsgiref.simple_server.make_server)<BR>
&gt;<BR>
&gt; I see:<BR>
&gt;&nbsp;&nbsp; wsgi.multiprocess is False<BR>
&gt;&nbsp;&nbsp; wsgi.multithread is True<BR>
&gt;&nbsp;&nbsp; wsgi.run_once is False<BR>
&gt;<BR>
&gt; I'm surprised by the value of multithread, since it<BR>
&gt; appears (and looking at the code seems to verify) that<BR>
&gt; additional threads are never created; i.e. the server<BR>
&gt; synchronously handles one request at a time.<BR>
&gt;<BR>
&gt; Am I missing something?&nbsp; It there a better choice for<BR>
&gt; an out-of-the box server to work in an WSGI<BR>
&gt; 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>