Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
It seems to be mostly licensing but DreamHost says there are some performance considerations, too: wiki.dreamhost.com/Mod_fcgid –  ta.speot.is Jan 2 '11 at 11:33

2 Answers 2

up vote 1 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

 
discard

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.