[fpc-pascal] How to use FCGI in threaded mode?
Michael Van Canneyt
michael at freepascal.org
Fri Jan 30 12:57:01 CET 2015
On Fri, 30 Jan 2015, Michael Schnell wrote:
> On 01/30/2015 08:46 AM, Michael Van Canneyt wrote:
>> Only if you use proxy fastcgi (i.e. a separately running binary listening
>> on a fixed port, not started in Apache), then threading may be useful.
> Am I wrong thinking, that using "proxy FCGI" projects are a lot easier to
> manage, anyway, as here you can use normal debugging means (e.g. Lazarus) ?
On windows they must be service programs, which are an absolute horror to debug.
> And with a permanently running independent executable, you also can do a lot
> of stuff that might be difficult to accomplish with a program started and
> killed by the Server.
Well, I switched from proxy fcgi to normal fastcgi for performance reasons.
It simply scales better.
With all the virtualization happening these days, introducing state on the
server is a very bad idea anyway, so I would not recommend this approach.
As for debugging:
it rarely happens that I must debug an actual running fastcgi program.
All code is unit tested, and the unit tests run in a CLI program.
The nice thing of web is that it is simply "text in, text out".
Can perfectly be simulated on the command-line.
More information about the fpc-pascal