What does FastCGI mean: message to server?

I am getting this error in PHP (Drupal) application:

(104)Connection reset by peer: FastCGI: comm with server "/opt/php-5.2.5/bin/php-cgi" aborted: read failed

      

This error is often followed by:

FastCGI: incomplete headers (0 bytes) received from server "/opt/php-5.2.5/bin/php-cgi"

      

The basic Apache configuration for PHP looks like this:

   FastCgiServer /opt/php-5.2.5/bin/php-cgi -initial-env PHP_FCGI_CHILDREN=32
   ScriptAlias /fcgi-bin/php-5.2.5 /opt/php-5.2.5/bin/php-cgi
   <Location /fcgi-bin/php-5.2.5>
     Options +ExecCGI
     SetHandler fastcgi-script
     SetOutputFilter INCLUDES
   </Location>
   # send php5.2-fastcgi handler to our scriptalias
   Action php-5.2.5-fastcgi /fcgi-bin/php-5.2.5

      

Now, my main question is, what are the common causes of a "comm with server" error? In this particular case, the error occurs intermittently, but some pages generate the error more often than others. I would like to know what to look for when debugging my code.

+1


source to share


5 answers


In this particular problem, it was due to an odd bug in my code ... it seems that some kinds of errors cause FastCGI to fail so badly that it doesn't redirect to the original PHP code error. Sorry, I have no more details for those who you visit Google.



+4


source


What character set are you using? I read that some people have problems if their application uses a different character set.

Have a look at this



Sorry, I cannot find better results.

+1


source


Sometimes it helps. output.buffering = 1

to php.ini file

+1


source


None of the above questions addressed my specific problem, there was a great answer here !

0


source


I had the same problem, but in python, I decided to change the extension of my script to .py

#.htaccess file
AddHandler fastcgi-script .py

      

-1


source







All Articles