Welcome, Guest. [ Log In ]
Question   FastCGI
Search KBase


Top 5 in this Area:
1. How can people subscribe to my mailing list?
2. Do you have this perl module installed on your servers?
3. What's the difference between PHP-CGI and PHP as an Apache module?
4. PHP Security
5. How do I dump data into MySQL?

 
FastCGI
FastCGI is a method of making cgi scripts faster by allowing them to remain running between web requests. A particular script must explicitly take advantage of FastCGI to benefit and a script that does not support FastCGI will most likely return an error if you try to use it with FastCGI.

You can enable FastCGI on a specific domain when you are adding the domain initially or from the Domains -> Manage area of our web panel. If you have a script that has been written for FastCGI, you can run it through the FastCGI module by changing the file extension to .fcgi or .fcg.

As of November 5, 2005, our FastCGI module is configured in dynamic mode using this configuration line:
FastCgiConfig -autoUpdate -initial-env RAILS_ENV=production -idle-timeout 120 -maxClassProcesses 5 -killInterval 300

Note however that the configuration may change without notice if it becomes necessary to do so to maintain performance and stability.

Last updated: Nov 05, 2005.

User Post (2005-12-31 07:50:45 by reywob)
Does PHP work with FastCGI? It would be good to know
User Post (2005-11-05 13:34:34 by mrjcleaver)
http://wiki.dreamhost.com/index.php/FastCGI
User Post (2005-11-02 20:07:33 by twilcoxen)
The FastCGI processes are dynamic, but I don't know the rest of the configuration. I have some info specific to Ruby on Rails here: http://convergentarts.com/pages/fastcgi
User Post (2005-08-04 13:28:30 by brade)
I was able to get my FastCGI application working on DreamHost without changing its extension by changing my .htaccess file to include:

<Files pearlcomments>
SetHandler fastcgi-script
</Files>

My application is now treated as a FastCGI external app; Apache seems to start it up when the first request arrives. I can shut it down by killing the process.
User Post (2005-08-01 22:07:33 by rmunn)
This information is nice to have, but thoroughly inadequate for someone like me who's trying to troubleshoot a non-working FastCGI app. I assume DreamHost is using <a href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html">mod_fastcgi</a>. How is it configured? Using static, dynamic, or external applications? I need to know because external applications are supposed to start themselves whereas static and dynamic applications are started (and their process lifetime is managed) by Apache. And what are the exact FastCgiServer, FastCgiConfig, and/or FastCgiExternalServer lines used in httpd.conf?

Ideally I'd like to see the entire httpd.conf section dealing with FastCGI, so I can use it as a reference when I'm writing my FastCGI apps, but I understand if this is impossible. Really, I just want more information then "Use the .fcgi extension. Good luck!"