Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
It seems to be mostly licensing but DreamHost says there are some performance considerations, too: – Jan 2 '11 at 11:33
up vote 5 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.