Welcome! Log In Create A New Profile

Advanced

why 'client closed prematurely connection while sending request to upstream' ?

Yu.Cheung
April 20, 2009 10:52PM
Hi,
All.
I want to proxy twice. but there was something wrong with it.

what I want to do:

client send request----->nginx server------->sending(proxy_pass)
its header to the backend server 1 ---->back to ngx server---->proxy
pass to the second backend server---->back to ngx server---->response
to client.

but when the request was sent to backend server 1, 'the client
closed prematurely connection while sending request to upstream' came,
all of my http servsers are Nginx.

the simple conf (just use virtual 3 servers) is:

http {
include mime.types;
default_type text/html;
expires -1;


sendfile on;


client_max_body_size 10000m;



server {

server_name front;
listen 8389;

location / {

if ($uri ~ "/(.*)") {
set $fn $1;
}

proxy_ignore_client_abort on;

proxy_pass_request_body off;
proxy_pass http://10.68.3.23:8390;


location /pass {
proxy_pass_request_body on;
proxy_pass http://10.68.3.23:8388/$fn;
}

location /download {
proxy_pass http://10.68.3.23:8388/$fn;
}


}#end of location /

}#server

server {

server_name transfer;
listen 8390;
proxy_ignore_client_abort on;

location / {
set $loc "/pass";
add_header "X-Accel-Redirect" $loc;
return 301;
}


}#backend server 1


server {
server_name storage;
listen 8388;



location / {
root /data;
client_body_temp_path /data1/client_tmp;

dav_methods PUT DELETE MKCOL COPY MOVE;

create_full_put_path on;
dav_access user:rw group:rw all:rw;

limit_except GET {
allow all;
}
}

}#backend server 2


}#http

---------------------------
when i put one file to test, while sending to the first upstream
server(backend 1), the connection closed.
why ?

Thanks.
Subject Author Posted

why 'client closed prematurely connection while sending request to upstream' ?

Yu.Cheung April 20, 2009 10:52PM

Re: why 'client closed prematurely connection while sending request to upstream' ?

Yu.Cheung April 21, 2009 05:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready