[python-win32] Options for running Python under IIS?

Preston Landers planders at gmail.com
Mon Nov 30 23:13:57 CET 2009


> On 13/11/2009 4:21 AM, Randy Syring wrote:
> > You may be able to use isapi-wsgi with a custom application pool to
> > achieve what you are looking for. If you can restrict the application
> > pool to only use one thread per process (which I am not sure how to do)
> > and then use multiple processes (properties -> performance -> maximum
> > number of worker processes), you may be able to achieve what you are
> > trying to do. You might want to ask more questions on the isapi-wsgi board.
>
> This sounds right - and you select a non-threaded implementation simply
> by way of the base class you inherit from in your Python implementation.
>
> Cheers,
>
> Mark

Hello,

I just thought I'd follow up on my original post about IIS.   We
decided to go ahead and use isapi-wsgi and so far the results are very
good.  It won't go into official production for a while but it looks
very promising.  In order to avoid the threading issue (we do in fact
use mutable module level variables) we are using the "simple"
(non-threaded) base class. To achieve concurrency we're using the IIS
"web garden" feature, which is the config setting Randy mentioned to
allow multiple worker processes per application pool.  We're
configuring the app pool through ADSI, the same way Python-ISAPI
configures itself.

Speaking of which - it seems like the ADSI stuff for IIS might be
deprecated?  I only say that because it's not installed by default in
newer versions of Windows and must be selected as "IIS Metabase and
IIS 6 configuration compatibility" in the Windows feature selection.
That's not a problem for my app - the installer detects the lack of
this component.  But calling it "IIS 6 configuration compatibility"
seems to suggest ADSI might eventually go away.  Or maybe it doesn't -
does anyone know?   I'm just wondering if Python-ISAPI might
eventually have to be updated to use WMI for configuration instead.
Links like this which compare ADSI and WMI don't say anything about
ADSI being deprecated.  It's just not installed by default for IIS 7+.

http://msdn.microsoft.com/en-us/library/ms525885.aspx

thanks,
Preston


More information about the python-win32 mailing list