阿帕奇proxfy_fcgi - 错误调度请求

问题描述 投票:11回答:4

我对谷歌云主机,它吸收了实话,但我试图得到它,我安装在VM LAMP堆栈,并把我的网站在htdocs目录。当我尝试访问我的网站,它给了我request timeout但有时它的工作原理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中,我并没有改变任何东西比目录权限等,有什么我失踪?

php apache proxy lamp dispatch
4个回答
3
投票

我也有这个问题。您可能需要寻找一个硬编码部分,在代码中另一个不可用的服务器的连接。 (例如,本地IP是不是在线访问)。

对于我的,我检查了我的服务器上的PHP fpm.log,我发现我的应用程序试图连接到旧服务器(错误的IP),并用定时出来的面孔。


2
投票

对我来说,PHP-FPM的重新启动做的工作。寻找在日志中的@varlogtim劝后。日志表明,是为最后12小时无活动...


2
投票

我有同样的问题,原来的Apache具有模块,处理超时称为mod_reqtimeout

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

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

以我为例,我上传通过一个普通的HTML表单提交文件,因此该文件是技术上包头的一部分,默认配置说,头部将在20至40秒超时。 20-40事情是很酷的,因为它会在20秒后超时,但如果500个字节的每秒发送的,它会直到达到40秒,然后超时不管添加的等待时间,额外的第二。

我上传我的网站,所以我说这行到我的httpd.conf文件更大的文件:

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

所以只要我的用户以最低的500字节/秒发送数据,请求将不会超时,直到最大。 600秒内可达到(更好的阅读文件,不要引用我的吞吐率)

它实际上是一个很酷的Apache模块,但作为人建议改变在其他类似的“规定已过期的超时:”其他的Apache超时设置不是超级众所周知的有关PHP-FPM的问题,但与时间超过40任后此问题发生秒,默认情况下在Apache中提交。


1
投票

看来,你的PHP代码所用时间比配置的超时更长的时间来完成。当Apache加载使用FCGI PHP页面发送到要被处理PHP-FPM服务的请求。如果PHP-FPM需要长期响应,那么你会看到这种类型的超时。可能的原因是你的PHP代码可以停留在循环或等待从走的是一条特别长的时间数据库的响应。

要解决我会使用PHP的CLI版本,看看如果脚本在合理时间内($时间PHP /path/to/file.php)完成。有可能在PHP-FPM日志的其他信息(默认:/var/log/php-fpm.log)。

© www.soinside.com 2019 - 2024. All rights reserved.