Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Nginx+;php5.2 fpm 502错误_Php_Linux_Nginx - Fatal编程技术网

Nginx+;php5.2 fpm 502错误

Nginx+;php5.2 fpm 502错误,php,linux,nginx,Php,Linux,Nginx,我在服务器中发现了两种502错误: connection reset by peer, it happens as request_time reach to 10s. connection timeout, it happens as request_time reach to 3s. 服务器是: centos , kernel(2.6.32) php5.2 php-fpm nginx 1.6.3. 访问日志输出: [28/Nov/2015:14:41:08 +0800] "GET /be

我在服务器中发现了两种502错误:

connection reset by peer, it happens as request_time reach to 10s.
connection timeout, it happens as request_time reach to 3s.
服务器是:

centos , kernel(2.6.32)
php5.2 php-fpm
nginx 1.6.3.
访问日志输出:

[28/Nov/2015:14:41:08 +0800] "GET /ben2.php HTTP/1.1" 502 172 "-" "Apache-HttpClient/4.2.6 (java 1.5)" "-" 3.000

[28/Nov/2015:14:41:11 +0800] "GET /ben2.php HTTP/1.1" 502 172 "-" "Apache-HttpClient/4.2.6 (java 1.5)" "-" 10.000
错误日志:

2015/11/28 14:41:11 [error] 12981#0: *798323 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xx.xx.xx, server: xx.xx.xx, request: "GET /ben2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xx.xx.xx"

2015/11/28 14:41:08 [error] 12981#0: *798215 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: xx.xx.xx, request: "GET /ben2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xx.xx.xx"
我尝试过“请求\终止\超时、快速CGI\连接\超时、快速CGI\读/写\超时”,但没有任何帮助

下一步我能做什么

编辑: 我编写了一个运行11秒的php文件,没有502个错误(因此我认为nginx和php没有限制)

502错误可能仅在压力测试时发生

在出现502个错误时,php脚本仍能成功运行