Apache 和 php7.0-fpm – 偶尔出现错误 500

Apache 和 php7.0-fpm – 偶尔出现错误 500

我正在运行基于 Debian 的办公服务器(用于开发基于 TYPO3 的网站)并且已从 mod_fcgid 更改为 PHP FPM - 只是为了轻松使用两个 PHP 版本......

现在,我正在运行 PHP 7.0 的项目/虚拟主机,偶尔会出现错误 500。当我刷新同一页面/或执行相同操作时,它会起作用 - 所以这真的很烦人,因为我找不到任何解决方案。

我正在使用默认的 php7.0-fpm 配置。

我的 vhost 配置如下:

<VirtualHost  192.168.2.10:80>
    ServerName mdo.ka.dev
    ServerAlias mdo.ka.dev

    DocumentRoot /var/www/git_websites/MDO
    SuexecUserGroup myuser mygroup

    ServerAdmin info@myemail

    UseCanonicalName Off
  DirectoryIndex index.htm index.html index.php

  AddType application/x-httpd-fastphp7---mdo .php
  Action application/x-httpd-fastphp7---mdo /php7-fcgi---mdo
  Alias /php7-fcgi---mdo /usr/lib/cgi-bin/php7-fcgi---mdo
  FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi---mdo -socket /run/php/php7.0-fpm.sock -idle-timeout 900 -pass-header Authorization

    <Directory /var/www/git_websites/MDO>
        AllowOverride FileInfo
    </Directory>
</VirtualHost>

我收到了以下错误:

[Mon Apr 10 10:02:37.341218 2017] [fastcgi:error] [pid 20539]  (104)Connection reset by peer: [client 192.168.2.54:60604] FastCGI: comm with server "/usr/lib/cgi-bin/php7-fcgi---mdo" aborted: read failed, referer: http://mdo.ka.dev/kontakt/distributoren/
[Mon Apr 10 10:02:37.341271 2017] [fastcgi:error] [pid 20539] [client 192.168.2.54:60604] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7-fcgi---mdo", referer: http://mdo.ka.dev/kontakt/distributoren/

我不明白问题出在哪里。当我停止 PHP FPM 服务时,我收到相同的错误 500/sam 日志消息。所以我认为“他”无法连接到 FPM 服务器。但是当我在配置中增加进程或从动态模式切换到静态模式时,没有任何变化。我是该机器上唯一使用此 Web 服务器的用户 - 因此进程不可能太少。

我还关闭了 Zend Opcode 和 APCU 模块。同样没有任何变化。

希望有人能帮忙——处理这些错误很烦人。

答案1

看起来像解决方案:https://github.com/gplessis/dotdeb-php/issues/124 安装较新版本的 libpcre3。

相关内容