我在 PHP (Drupal) 应用程序中收到此错误:
(104)Connection reset by peer: FastCGI: comm with server "/opt/php-5.2.5/bin/php-cgi" aborted: read failed
经常会出现这个错误:
FastCGI: incomplete headers (0 bytes) received from server "/opt/php-5.2.5/bin/php-cgi"
PHP 的基本 Apache 配置如下所示:
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
现在,我的基本问题是,“与服务器通信”错误的一般原因是什么?在这种特殊情况下,错误会间歇性出现,但某些页面比其他页面更频繁地生成它。我想知道在调试我的代码时要寻找什么。