Jump to content


Photo

Random PHP FastCGI / Connection reset by peer / incomplete headers


  • Please log in to reply
1 reply to this topic

#1 adam3000

adam3000

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 02 August 2013 - 12:43 AM

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 ShodaN

ShodaN

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 08 October 2013 - 02:02 PM

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).






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com