我有一个正在运行的服务器:
- Ubuntu 16.04
- Apache 2.4.18
- 工人-MPM
- PHP 7.0.8-0ubuntu0.16.04.3
- PHP-FPM
- OPcache 7.0.8-0ubuntu0.16.04.3
浏览器上有一个 ajax 脚本,每 5 秒向 php 文件发送一次查询以更新数据库上的时间戳,该脚本在其他服务器上运行良好,但在这里由于用户不多,它会记录以下错误:
[2016 年 12 月 5 日星期一 09:11:39.575035] [proxy_fcgi:error] [pid 7831:tid 140159538292480](70008)部分结果有效但处理不完整:[客户端 172.30.197.200:64422] AH01075:将请求发送到:(读取输入旅)时出错,引用者:http://10.200....文件.php
我不知道这是什么问题,也不知道该如何解决。我搜索了整个网络,但一无所获,任何提示都非常感谢。
编辑1:
我将错误模式切换为调试,错误的完整日志如下:
[Wed Dec 07 08:55:13.465599 2016] [authz_core:debug] [pid 5461:tid 139687427467008] mod_authz_core.c(809): [client 172.31.42.163:54432] AH01626: authorization result of Require all granted: granted, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465613 2016] [authz_core:debug] [pid 5461:tid 139687427467008] mod_authz_core.c(809): [client 172.31.42.163:54432] AH01626: authorization result of <RequireAny>: granted, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465634 2016] [proxy:debug] [pid 5461:tid 139687427467008] mod_proxy.c(1160): [client 172.31.42.163:54432] AH01143: Running scheme unix handler (attempt 0), referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465640 2016] [proxy_fcgi:debug] [pid 5461:tid 139687427467008] mod_proxy_fcgi.c(879): [client 172.31.42.163:54432] AH01076: url: fcgi://localhost/var/www/html/sala.server.php proxyname: (null) proxyport: 0, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465652 2016] [proxy_fcgi:debug] [pid 5461:tid 139687427467008] mod_proxy_fcgi.c(886): [client 172.31.42.163:54432] AH01078: serving URL fcgi://localhost/var/www/html/sala.server.php, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465658 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2160): AH00942: FCGI: has acquired connection for (*)
[Wed Dec 07 08:55:13.465663 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2213): [client 172.31.42.163:54432] AH00944: connecting fcgi://localhost/var/www/html/sala.server.php to localhost:8000, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465668 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2250): [client 172.31.42.163:54432] AH02545: fcgi: has determined UDS as /run/php/php7.0-fpm.sock, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465735 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2422): [client 172.31.42.163:54432] AH00947: connected /var/www/html/sala.server.php to httpd-UDS:0, referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.465771 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2701): AH02823: FCGI: connection established with Unix domain socket /run/php/php7.0-fpm.sock (*)
[Wed Dec 07 08:55:13.480503 2016] [proxy_fcgi:error] [pid 5461:tid 139687427467008] (70008)Partial results are valid but processing is incomplete: [client 172.31.42.163:54432] AH01075: Error dispatching request to : (reading input brigade), referer: http://10.200.200.214/sala.php?sala=Unica
[Wed Dec 07 08:55:13.480533 2016] [proxy:debug] [pid 5461:tid 139687427467008] proxy_util.c(2175): AH00943: FCGI: has released connection for (*)
答案1
这个答案没有解决这个问题。但我在遇到同样的错误时遇到了这个问题。我的问题是我已经以编程方式(使用location.reload
)刷新了我的网页,同时发送了多部分发布请求到服务器。
希望这能对某人有所帮助。
答案2
您可以尝试增加此模块的默认超时时间:
RequestReadTimeout header=10-20,MinRate=500 body=20,MinRate=500
如果 10 秒内未发送标头,Apache 将关闭连接;如果速率低于 500 字节/秒,则 20 秒内未发送标头,Apache 将关闭连接。主体部分也一样。
因此,您可以尝试增加超时秒数,而不是禁用该模块。
RequestReadTimeout header=10-40,MinRate=500 body=40,MinRate=500
答案3
就我而言,Apache2 模块reqtimeout
导致了此错误:AH01075: Error dispatching request to : (reading input brigade)
禁用后reqtimeout
模块sudo a2dismod reqtimeout
并重新加载 Apache 服务器后,一切似乎都正常运行。