On Wed, 1 Dec 2010, Joost van der Sluis wrote:
On Wed, 2010-12-01 at 15:51 +0100, [email protected] wrote:
On Wed, 1 Dec 2010, Joost van der Sluis wrote:
The can do the same thing:
By default, a fastcgi process is started by the webserver, passing it the
socket on which it should listen.
Most imporant difference is that mod_fastcgi is deprecated and doesn't
follow the FastCGI standard.
In what way doesn't it follow the FastCGI standard ?
The way how a connection is initialized, using a socket, is part of the
specification. Providing a port isn't. See:
http://www.fastcgi.com/drupal/node/6?q=node/22#S3.2
Yes, this I know. But this is an addition, it can follow the standard too.
But providing the port is IMHO the sanest thing to do, as it gives you the
most control over the FastCGI process.
But mod_fastcgi additionally allows you to specify that the fastcgi process is
already running, and that no process should be started. The process can run
on the same or on another machine as the Webserver:
What you described here is the FastCGI standard. This way the webserver
can scale up the amount of connections for each instance of the
cgi-process.
Can you show me how ?
These are standard options of mod_cgid?
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgididletimeout
And also look for fcgidmaxprocesses, fcgidmaxrequestsperprocess,
fcgidprocesslifetime
This I know, I was talking about how to do FastCgiExternalServer
Also check this:
http://www.fastcgi.com/drupal/node/6?q=node/22#S4.1
The FastCGI process should return how many connection and requests it
can handle. I'm not sure anymore if FastCGI of fpc can handle muliple
requests at a time. (It could, but some parts ahve been changed)
It never could.
There is 1 connection, and all requests go through this connection.
A week (or maybe 2) ago, I sent you a private mail about using select()
on the connection handle. This or the use of threads could be used to
handle multiple connections. Maybe look it up and reply :-)
FastCgiExternalServer D:/counte/verbruik/server -host 127.0.0.1:2015
-idle-timeout 30 -flush
You can configure mod_fcgid also this way, if you want. (Except for
debugging, I woudn't know why you would do that. And I use the embedded
webserver for debugging)
How ? I tried, but found no description of how to do this.
I tried to find it, but now I remember that I looked for this earlier
and coudn't find it. Probably because it isn't part of the FastCGI
standard. So, no, if you need a specified port, you have to stick with
mod_fastcgi.
Exactly :-)
That's why I use mod_fastcgi, because the mod_fcgid doesn't offer an
equivalent of FastCgiExternalServer.
Seems you're right.
This is very convenient, because you can start the fastcgi process in the
debugger, just as any normal process. Or, the fastCGI process can be a
windows service.
Hmm.. windows service could be an idea. But that scales not that easy,
offcourse.
Other than that, the configuration option names are different.
My FastCGI process is running as a windows service.
What is exactly the reason for this? Isn't it much easier when the
webserver starts (and stops, when it is not used) the cgi-application,
than doing this in a Windows service?
I want to control the amount of instances and the exact moment of their
start/stop. I don't want the server to control my application instance.
Because you don't trust IIS? ;)
Definitely not IIS (I would only use IIS with ASP.NET, since I suspect that
Microsoft will dump support for anything else).
But Apache I also don't trust. I want decide when to start/stop my daemon,
not leave it to the webserver...
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus