php - Apache proxfy_fcgi - 将请求分派(dispatch)到时出错

标签 php apache proxy lamp dispatch

我在 Google 上有云托管,说实话,这很糟糕,但我正在尝试继续使用它,我在虚拟机上安装了 LAMP 堆栈,并将我的网站放在 htdocs 中。当我尝试访问我的网站时,它给我请求超时,但有时它会工作 5 分钟左右。

当我看到 apache 错误日志时,它给了我这个

075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:55.185819 2015] [proxy_fcgi:error] [pid 4995:tid 140183521683200] (70007)The timeout specified has expired: [client 162.158.255.169:34198] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:55.487458 2015] [core:notice] [pid 2953:tid 140183785137920] AH00052: child pid 4995 exit signal Segmentation fault (11)
[Tue Oct 27 18:12:55.787973 2015] [proxy_fcgi:error] [pid 5063:tid 140183530075904] (70007)The timeout specified has expired: [client 199.27.133.137:13151] AH01075: Error dispatching request to : (polling), referer: http://whichtube.com/watch/g9-4dCeFQng/allama-nasir-abbas-jawab-ali-as-nae-talwar-kayou-na-uthai.html
[Tue Oct 27 18:12:57.542883 2015] [proxy_fcgi:error] [pid 5329:tid 140183521683200] (70007)The timeout specified has expired: [client 173.245.56.198:51348] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:57.976752 2015] [proxy_fcgi:error] [pid 5063:tid 140183479719680] (70007)The timeout specified has expired: [client 173.245.56.198:63779] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:58.993666 2015] [proxy_fcgi:error] [pid 5194:tid 140183496505088] (70007)The timeout specified has expired: [client 162.158.255.141:16226] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:12:59.196701 2015] [proxy_fcgi:error] [pid 5329:tid 140183513290496] (70007)The timeout specified has expired: [client 173.245.56.198:32819] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:01.462039 2015] [proxy_fcgi:error] [pid 5329:tid 140183504897792] (70007)The timeout specified has expired: [client 199.27.128.166:48057] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:07.518999 2015] [proxy_fcgi:error] [pid 5063:tid 140183471326976] (70007)The timeout specified has expired: [client 173.245.56.198:13694] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:16.804990 2015] [proxy_fcgi:error] [pid 5261:tid 140183513290496] (70007)The timeout specified has expired: [client 199.27.128.134:28694] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:33.055860 2015] [proxy_fcgi:error] [pid 5328:tid 140183236331264] (70007)The timeout specified has expired: [client 39.41.139.220:52154] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:57.391361 2015] [proxy_fcgi:error] [pid 5063:tid 140183521683200] (70007)The timeout specified has expired: [client 39.41.139.220:52029] AH01075: Error dispatching request to : (polling)
[Tue Oct 27 18:13:57.552542 2015] [core:notice] [pid 2953:tid 140183785137920] AH00052: child pid 5063 exit signal Segmentation fault (11)

我的网站是用 PHP 编写的,除了目录权限之外我没有更改任何其他内容,我是否缺少某些内容?

最佳答案

我遇到了同样的问题,结果 Apache 有一个处理超时的模块,名为 mod_reqtimeout

默认值(您不会在默认的 http.conf 中看到它)是:

RequestReadTimeout handshake=0 header=20-40,MinRate=500 body=20,MinRate=500

在我的例子中,我通过纯 HTML 表单提交上传文件,因此从技术上讲,该文件是 header 的一部分,默认配置表明 header 将在 20 到 40 秒时超时。 20-40 的事情非常酷,因为它会在 20 秒时超时,但如果一秒钟发送 500 字节,它将额外增加一秒的等待时间,直到达到 40 秒,然后无论如何都会超时。

我在网站中上传较大的文件,因此我将此行添加到我的 httpd.conf 文件中:

RequestReadTimeout handshake=0 header=20-600,MinRate=500 body=20,MinRate=500

因此,只要我的用户以至少 500 字节/秒的速度发送数据,请求就不会超时,直到达到最大值。达到 600 秒(最好阅读文档,不要引用我的吞吐率)

它实际上是一个非常酷的 Apache 模块,但并不是非常出名,因为人们建议在其他类似的“指定的超时已过期:”与 PHP-FPM 相关的问题中更改其他 apache 超时设置,但任何使用该模块的帖子都会发生此问题Apache默认提交时间超过40秒。

关于php - Apache proxfy_fcgi - 将请求分派(dispatch)到时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33375823/

相关文章:

php - 为什么 php 在引用一个不存在的变量时不报错?

zend-framework - Zend_Pdf UTF-8 字符?

sql - 使用铆钉的 Informix 提取不返回查询结果的结尾

mysql - Xampp MySQL 未启动 - "Attempting to start MySQL service..."

bash netcat 代理结合 awk

php - 在 jquery 函数中使用选项值作为文件名变量

php - 当应用访问列表时,NGINX 会导致下载 index.php

javascript - ExtJS:如何从任何其他代理 Access Ajax 请求的值?

ios - 如何在 iOS 11 中使用 NEDNSProxyProvider

php - 使用来自 PHP 网页的输入参数运行 .exe