IIS 7 and Above
does fastcgi module support multi-thread fastcgi server?
Last post Feb 25, 2009 02:36 PM by sanpei
Feb 24, 2009 09:58 AM|sanpei|LINK
i test some examples with OpenMarket libfcgi on IIS 7, including the one (threaded.c) on fastcgi.com.
though there are many thread created, but seems got a dead lock when get the lock.
next i remove the lock code around ' rc = FCGX_Accept_r(&request);',but only one of threads can select/accept sockets and make right response.
btw, in IIS manager, i set to use TCP. with NamedPipe, all threads will idle at WriteFile(in os_win32.c), i think it caused by different thread read/write the same fileHandle, am i right?
Feb 24, 2009 12:37 PM|anilr|LINK
Since each fastcgi process will only receive one request at a time - making it multi-threaded is kind of pointless, right? You can make it multi-threaded if you want, you still have to synchronize any data receives/sends.
Feb 25, 2009 02:41 AM|sanpei|LINK
thx for your reply.
since use few process but more threads maybe faster and more responsibility on windows, is there any plan upgrading fastcgi mod to make fastcgi app process can accept more than one request from IIS fastcgi manager? then we can use threads for processing
some requests (in queque with current version mod) at same time, with lower costs.
with current version, is there any setting to keep min (always running) instances count?
Feb 25, 2009 02:13 PM|anilr|LINK
The main reason for the IIS fastcgi support is that the IIS CGI support is pretty slow and the ISAPI support does not work for techonologies that are used to single-threaded request processing on apache and are hence not thread safe (eg many 3rd party php
libraries) - so the fastcgi support provides single threaded processing while improving performance by many orders of magnitude compared to CGI. If you really wanted multi-threaded execution of requests, the ISAPI API (or the new IIS7 modules APIs) would
be the one to consider rather than trying to get fastcgi to support multiple concurrent requests.
Feb 25, 2009 02:36 PM|sanpei|LINK
thank you for your suggestion, and sorry for my poor english :)