- 论坛徽章:
- 0
|
本帖最后由 xiangbei1573 于 2015-06-18 21:07 编辑
nginx 主配置文件:
user www www;
worker_processes 2;
error_log /data/logs/nginx/error.log crit;
pid /var/run/nginx.pid;
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http
{
include mime.types;
default_type application/octet-stream;
access_log off;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 80m;
sendfile on;
tcp_nopush on;
keepalive_timeout 300;
tcp_nodelay on;
fastcgi_connect_timeout 3000;
fastcgi_send_timeout 3000;
fastcgi_read_timeout 3000;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
#limit_zone crawler $binary_remote_addr 10m;
upstream svn {
ip_hash;
server 192.168.0.xx:88 max_fails=3 fail_timeout=30s;
}
include vhosts/vhosts.conf;
}
vhosts文件:
server {
listen 88;
server_name 10.10.10.x;
root /data/wwwroot;
index index.html index.php;
error_log /data/logs/nginx/access_error.log;
access_log /data/logs/nginx/access.log;
location / {
proxy_set_header Host $host;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_504;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header http_x_forwarded_for $remote_addr;
proxy_set_header REMOTE_ADDR $remote_addr;
# proxy_set_header X-REAL-IP $remote_addr;
proxy_pass svn;
}
}
当下载文件为74M时,总是报这个错误:
2015/06/18 18:14:42 [crit] 3955#0: *19 writev() "/opt/nginx-1.2.7/proxy_temp/0/01/0000000010" has written only 7168 of 8192 while reading upstream, client: 10.10.10.xx, server: 10.10.10.xx, request: "GET artifactoryxx HTTP/1.0", upstream: " 192.168.0.xxxx", host: "10.10.10.xx"
百度、雅虎、google镜像都查了一下,可惜没看到相似的答案,我觉得应该是fascgi或这是proxy的一些参数问题,但是真不清楚该怎么调整,请大家帮帮忙,谢谢了! |
|