nginx php 104,php – nginx错误“recv()失败(104:对等连接重置)从上游读取响应头”...

我有一台服务器工作正常,直到2013年10月3日上午10:50,它开始间歇性地向客户端返回“502 Bad Gateway”错误.

大约有五分之四的浏览器请求成功,但大约五分之一的用户失败了502.

nginx错误日志包含数百个这样的错误;

2013/10/05 06:28:17 [error] 3111#0: *54528 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 66.249.66.75, server: www.bec-components.co.uk request: ""GET /?_n=Fridgefreezer/Hotpoint/8591P;_i=x8078 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.bec-components.co.uk"

但是PHP错误日志不包含任何匹配错误.

有没有办法让PHP给我更多关于它为什么重置连接的信息?

这是nginx.conf;

user www-data;

worker_processes 4;

error_log /var/log/nginx/error.log;

pid /var/run/nginx.pid;

events {

worker_connections 1024;

}

http {

include /etc/nginx/mime.types;

access_log /var/log/nginx/access.log;

sendfile on;

keepalive_timeout 30;

tcp_nodelay on;

client_max_body_size 100m;

gzip on;

gzip_types text/plain application/xml text/javascript application/x-javascript text/css;

gzip_disable "MSIE [1-6]\.(?!.*SV1)";

include /gvol/sites/*/nginx.conf;

}

这是该网站的.conf;

server {

server_name www.bec-components.co.uk bec3.uk.to bec4.uk.to bec.home;

root /gvol/sites/bec/www/;

index index.php index.html;

location ~ \.(js|css|png|jpg|jpeg|gif|ico)${

expires 2592000; # 30 days

log_not_found off;

}

## Trigger client to download instead of display '.xml' files.

location ~ \.xml${

add_header Content-disposition "attachment; filename=$1";

}

location ~ \.php${

fastcgi_read_timeout 3600;

include /etc/nginx/fastcgi_params;

keepalive_timeout 0;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

}

}

## bec-components.co.uk ##

server {

server_name bec-components.co.uk;

rewrite ^/(.*) http://www.bec-components.co.uk$1 permanent;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值