Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've recently installed mod_fastcgi and Apache 2.2. I have a simple cgi script as below (test.fcgi):

echo sadjad

But when I invoke '' I see "Internal Server Error" after a short period of time.

The error.log file shows this error message:

[Tue Jan 31 22:23:57 2006] [warn] FastCGI: (dynamic) server "~/public_html/oaduluth/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

This is my .htaccess file:

AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L]

What could the problem be? Is it my .htaccess file?

share|improve this question

You're trying to run a CGI script through the FastCGI interface. That won't work. You can only run a FastCGI script, that follows the FastCGI specification, using the FastCGI interface. The server keeps running your script and trying to send it FastCGI requests and it keeps terminating without ever having received or processed any requests.

share|improve this answer

The problem is in your script. You must accept request before you print something to browser.

See the similar question on

share|improve this answer

Your Answer


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