Jump to content

Random PHP FastCGI / Connection reset by peer / incomplete headers


Recommended Posts

I've been having random 500 Internal Server errors on my PHP / MySQL based sites on various shared hosts. I'm using PHP 5.2.17 through CGI/FastCGI on a shared Linus server. When I look in the logs, I see this:

 

[error] [client 75.71.176.224] (104)Connection reset by peer: FastCGI: comm with server "/dev/shm/blackmou-php.fcgi" aborted: read failed, referer: ...
[error] [client 75.71.176.224] FastCGI: incomplete headers (0 bytes) received from server "/dev/shm/blackmou-php.fcgi", referer: ...
[error] [client 75.71.176.224] (104)Connection reset by peer: FastCGI: comm with server "/dev/shm/blackmou-php.fcgi" aborted: read failed, referer: ...
[error] [client 75.71.176.224] FastCGI: incomplete headers (0 bytes) received from server "/dev/shm/blackmou-php.fcgi", referer: ...

 

Anyone know how to resolve this?

  • 2 months later...

I had similar issues, and it turned out the memory limit settings (memory_limit) in my php.ini were too low. With FastCGI, in order to get some PHP errors, you have to set logging to a file instead of displaying them. When you display the PHP errors, this code just ends up confusing FastCGI, which then results in an Apache server error (500).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.