logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_fcgi is NOT a replacement for mod_fastcgi
Author
Ra



Joined: 17 Nov 2011
Posts: 1

PostPosted: Thu 17 Nov '11 21:25    Post subject: mod_fcgi is NOT a replacement for mod_fastcgi Reply with quote

After perusing the site here, I noticed some confusion about fcgid and fastcgi. As a long time user (10 years) of mod_fastcgi on both Windows and Linux, often running hundreds of virtual host fastcgi servers behind one instance of Apache 2, I know that FCGID cannot always replace mod_fastcgi.

Two misconceptions about fcgid continue to be put forth.

The following two statements are FALSE:
    (1) mod_fcgid and mod_fastcgi "do the same thing" [False]
    (2) mod_fastcgi has not been developed in some time, therefore mod_fcgid is somehow "better." [False]
FIRST:
mod_fcgid and mod_fastcgi don't "do the same thing." They both support the published "FastCGI" protocol, but how they control their FastCGI servers differs considerably. mod_fcgid quickly eliminates FastCGI servers and starts new ones. This is a problem and actually goes against the original intent of the FastCGI protocol. The FastCGI protocol was designed to allow long-running FastCGI server processes to quickly process requests without the overhead of starting a new process for every request (as in the original CGI protocol). Our apps are similar to PHP in that they can take multiple simultaneously requests from apache and internally spawn multiple threads to handle the requests. This scenario is not possible for us with mod_fcgid because of the great number of processes created/destroyed. (I'm not talking about anything involving mod_php.)

This bug report discussion is a good description of the problem and differences between the modules mod_fcgid and mod_fastcgi:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504132#25

SECOND:
True, the level of development activity is quite low on the mod_fastcgi project. FastCGI is a small lightweight protocol and the implementation doesn't require much maintenance. The two latest bug fixes I know of include the mod_fastcgi "deflate" problem and the mod_fastcgi problem "does not retry select() after an interrupted system call (linux only)." To my knowledge both of these have been fixed. In other words, mod_FastCGI is a stable project, therefore, not much development is required.

So if you're running mod_fcgid and having performance problems, you might want to check and see if mod_fcgid is starting/stopping too many of your FastCGI servers.

I would also like to encourage the maintenance of a mod_fastcgi build for the apachelounge.com version of Apache 2 because mod_fastcgi is required for true high-volume/high-performance websites.

I've depended on mod_fastcgi for years and I've tried and found that mod_fcgid cannot and will not work for me in it's current implementation.

I would like to try the apachelounge images, but until I build or obtain mod_fastcgi for it, we'll be sticking with the apache.org images.

Thanks for reading,
Ra Lemley
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Thu 17 Nov '11 21:42    Post subject: Reply with quote

Ra,

Thanks for the detailed explanation on the differences between the two.

It would be great if AL could host the mod_fastcgi as well. I'd love to test it vs. mod_fcgid.
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Wed 23 Nov '11 12:13    Post subject: Reply with quote

Quote:
So if you're running mod_fcgid and having performance problems, katalogowanie stronyou might want to check and see if mod_fcgid is starting/stopping too many of your FastCGI servers.


Yes is true respawning use lot of CPu and is problematic. To limit number of process need use
DefaultMaxClassProcessCount XX
FcgidMaxProcesses XX

Mod_fcgid can work like mod_fastcgi

My process is not respawn for about 2 weak's fcgid is not design for this but works.

MaxRequestsPerProcess 0

So Cache from php are not lose by respawn process

I try run fastcgi using PHP but i fail.
For me fcgid work great
Back to top
jimski



Joined: 18 Jan 2014
Posts: 196
Location: USSA

PostPosted: Sun 02 Feb '14 19:04    Post subject: Reply with quote

Quote:
Mod_fcgid can work like mod_fastcgi

I Don't believe so. My understanding is that there is a one huge difference between the two, mod_fastcgi can pass multiple simultaneous
requests to a single PHP process while mod_fcgid can't.

This effectively makes mod_fastcgi much better choice for a high traffic high concurrency website.

Also the new mod_proxy_fcgi for Apache 2.4 seems to be crippled just like mod_fcgid in terms of being limited to just one request per process at a time.

On windows 32bit with mod_fcgid you can't spawn more than 90 php-cgi processes and on windows x64 I wasn't able to spawn more than 140. So effectively with mod_fcgid you can't serve more than 140 connections at a time.
Back to top


Reply to topic   Topic: mod_fcgi is NOT a replacement for mod_fastcgi View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules