apache FastCGI: comm with server 是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/373027/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:02:59  来源:igfitidea点击:

What does FastCGI: comm with server mean?

phpapachefastcgi

提问by Aaron Longwell

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

我在 PHP (Drupal) 应用程序中收到此错误:

(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:

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

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.

现在,我的基本问题是,“与服务器通信”错误的一般原因是什么?在这种特殊情况下,错误会间歇性地出现,但某些页面比其他页面更频繁地生成它。我想知道在调试我的代码时要寻找什么。

回答by Aaron Longwell

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.

在这个特定的问题中,它与我的代码中的一个奇怪的错误有关......似乎某些类型的错误导致 FastCGI 失败得如此严重,以至于它不会转发底层的 PHP 代码错误。抱歉,对于从 Google 访问的人,我没有更多详细信息。

回答by Leandro Ardissone

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.

抱歉,我找不到更好的结果。

回答by Yuriy

Sometimes it helps. output.buffering = 1into your php.ini file

有时它有帮助。 output.buffering = 1进入你的 php.ini 文件

回答by workflow

None of the above addressed my particular issue, there's a great answer herethat did!

以上都不是解决我的具体问题,有一个伟大的答案在这里说没有!

回答by sacabuche

I had the same problem but in python and i resolved changing the extention of my script to .py

我遇到了同样的问题,但在 python 中,我解决了将脚本的扩展名更改为 .py

#.htaccess file
AddHandler fastcgi-script .py