What's the difference between "mod_fastcgi" and "mod_fcgid"?

I'm writing a fast CGI application to use with my Apache 2.2 (prefork) on Ubuntu Linux.

I need to choose between mod_fastcgi and mod_fcgid, but I can't find any resource that documents the difference (if any) to help me decide which one to enable with Apache.

Any one knows what the differences/pro/cons of using mod_fastcgi / mod_fcgid is/are?


It's mostly licencing differences. mod_fcgid is the free variant of mod_fastcgi.

The way of configuration also slightly differs. Besides that, mod_fastcgi is slightly faster.


The difference is explained quite well here:
libapache2-mod-fastcgi: fastcgi does not retry select() on EAGAIN

In short: mod_fcgid passes just one request to the FCGI server at a time while mod_fastcgi passes several requests at once, the latter is usually better for PHP, as PHP can manage several request using several threads and opcode caches like APC usually work only with threads and not with processes. This means that using mod_fcgid you end up having many PHP processes which all have their very own opcode cache.

This is also mentioned in the documentation of mod_fcgid under Special PHP considerations.