views:

1076

answers:

4

I'm getting this error in a PHP (Drupal) application:

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

It is often followed by this error:

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 basic question is, what are the general causes of the "comm with server" error? In this particular case, the error appears intermittently, but certain pages generate it more often than others. I'd like to know what to look for when debugging my code.

+1  A: 

What's the character set you're using? I've read that some people is having issues if their app is using a different character set.

Look at this

Sorry I can't find better results.

Leandro Ardissone
The forum that you linked to is no longer available.
Bill the Lizard
Sorry mate, can't get a cached copy of this.
Leandro Ardissone
+1  A: 

In this particular issue, it was related to an odd bug in my code... it seems certain kinds of errors cause FastCGI to fail so badly that it doesn't forward on the underlying PHP code error. Sorry I don't have more detail for those of you visiting from Google.

Aaron Longwell
A: 

Hi,

I'm comming from google because i'm having the same problem... I can say that it seems to come from passing an object reference or not... Strange anyway...

A: 

hi

i came from google to ) i have the same problem and still can't fix it

when i am trying to access my php script from web browser in one case out of five i've got apache 500 internal error

the same lines in error log

(104)Connection reset by peer: FastCGI: comm with server "/var/chroot/home/content/10/4749410/html-x-httpd-php5" aborted: read failed
FastCGI: incomplete headers (0 bytes) received from server "/var/chroot/home/content/10/4749410/html-x-httpd-php5"
cheshire cat