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

Randy Syring rsyring at inteli-com.com
Thu Nov 12 18:21:56 CET 2009


Preston Landers wrote:
> 4) Use isapi-wsgi:  This seems to be getting more popular but it seems
> to use threads and I'm wondering whether this will break my app in
> subtle ways.  I make heavy use of various Python C extension modules
> which may not be fully threadsafe.  Also within my app code there is
> extensive use of unprotected module-level Python variables.  Or am I
> misunderstanding how this works?
>   
Are your module-level variables mutable or immutable?  If they are 
mutable, then I would say you can't go with a threaded model here (but 
may be mistaken). 

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.

Another project to look into is PyISASPIe which is a similar concept to 
isapi-wsgi.  The author of that project is active on the boards and 
might be able to suggest to you how to limit the application pool as 
described above. 

--------------------------------------
Randy Syring
Intelicom
502-644-4776

"Whether, then, you eat or drink or 
whatever you do, do all to the glory
of God." 1 Cor 10:31



More information about the python-win32 mailing list