in reply to [FCGI.pm] - not threads-safe?
This bug prevent use FCGI.pm with threads. Does somebody has a working solution to use FCGI in main thread?
It isn't a bug. It means that FCGI is not thread-safe.
And given what FCGI does:
Instead of creating a new process for each request, FastCGI uses persistent processes to handle a series of requests. These processes are owned by the FastCGI server, not the web server. 1To service an incoming request, the web server sends environment information and the page request itself to a FastCGI process over a socket (in the case of local FastCGI processes on the web server) or TCP connection (for remote FastCGI processes in a server farm). Responses are returned from the process to the web server over the same connection, and the web server subsequently delivers that response to the end-user. The connection may be closed at the end of a response, but both the web server and the FastCGI service processes persist.2
Each individual FastCGI process can handle many requests over its lifetime, thereby avoiding the overhead of per-request process creation and termination. Processing of multiple requests simultaneously can be achieved in several ways: by using a single connection with internal multiplexing (i.e. multiple requests over a single connection); by using multiple connections; or by a combination of these techniques. Multiple FastCGI servers can be configured, increasing stability and scalability.
it almost certainly could never be thread-safe.
If you describe why you think you need threads, maybe we can help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: [FCGI.pm] - not threads-safe?
by zdm (Beadle) on Aug 20, 2013 at 10:29 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2013 at 13:13 UTC | |
by zdm (Beadle) on Aug 20, 2013 at 14:15 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2013 at 14:30 UTC | |
by zdm (Beadle) on Aug 20, 2013 at 14:52 UTC | |
|