Regarding proxy_next_upstream parameter

Roman Arutyunyan arut at nginx.com
Fri Aug 15 10:56:10 UTC 2014


On 10 Aug 2014, at 21:27, Pankaj Kaushik <dev.panky2014 at gmail.com> wrote:

> Hi,
> 
> I am trying to do failover as per below configuration :-
> 
> upstream backend {
>                 hash $key2 consistent;
>                 server 10.0.0.22:8080;
>                 server 10.0.0.23:8080;
>                 server 10.0.0.24:8080;
>                 server 10.0.0.25:8080;
>                 server 10.0.0.26:8080;
>         }
>         upstream backend_2 {
>                 server 10.0.0.22:8080;
>                 server 10.0.0.23:8080;
>                 server 10.0.0.24:8080;
>                 server 10.0.0.25:8080;
>                 server 10.0.0.26:8080;
>         }
> 
>             server {
>                 listen 90 default_server;
> 
>                 location = / {
>                    proxy_pass http://backend_2;
>                    proxy_next_upstream error timeout http_404;
>                 }
>                 location / {
>                    proxy_pass http://backend;
>                    proxy_next_upstream error timeout http_404;
>                 }
> 
>         }
> 
> In error logs i received following message :-
> 
> 2014/08/10 09:52:16 [info] 514#0: *184 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 14.102.112.84, server: , request: "GET /mybucket4/ HTTP/1.1", upstream: "http://10.0.0.23:8080/mybucket4/", host: "65.60.72.19:90"
> 
> 
> Can any body help me on this ?

The error text explains everything.  The client closes connection before
receiving any response from the server while it was sending request to
upstream.



More information about the nginx mailing list