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?


2 Answers 2


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.

  • 1
    It should be preferred answer
    – Adnan
    Mar 14, 2018 at 17:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .