Welcome! Log In Create A New Profile

Advanced

Re:Re: Re: Re: proxy_upstream_next while no live upstreams

Wu Bingzheng
May 13, 2017 12:42AM
Because the last request before this 502-request was almost 20 minutes ago, so there was no error log in 20 minutes before this 502-request.

This is some strange, and only happens very rarely.

I know it's difficult to debug this if not reproduced. I just ask here to see if this is a known question.

Thanks for your answer.

Wu




At 2017-05-12 18:39:12, "Maxim Dounin" <mdounin@mdounin.ru> wrote:
>Hello!
>
>On Fri, May 12, 2017 at 01:24:14PM +0800, Wu Bingzheng wrote:
>
>>
>> The last request before this 502 request is almost 20 minutes ago and its response code is 200.
>>
>> The proxy_next_upstream conf:
>> proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
>>
>> Here is the access log. The upstream server 192.168.0.6 is DOWN. The line-10 is the 502 request:
>>
>> 1 [03/May/2017:14:35:38 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.6:8181, 192.168.0.5:8181" 0.012 0.001, 0.011
>> 2 [03/May/2017:14:35:38 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.013 0.013
>> 3 [03/May/2017:14:54:30 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.206 0.206
>> 4 [03/May/2017:15:03:08 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.154 0.154
>> 5 [03/May/2017:15:40:51 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.6:8181, 192.168.0.5:8181" 0.012 0.000, 0.012
>> 6 [03/May/2017:15:40:51 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.014 0.014
>> 7 [03/May/2017:15:40:51 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.016 0.016
>> 8 [03/May/2017:15:40:51 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.017 0.017
>> 9 [03/May/2017:15:40:51 -0400] "POST /x/y HTTP/1.1" 200 "192.168.0.5:8181" 0.011 0.011
>> 10 [03/May/2017:15:59:06 -0400] "POST /x/y HTTP/1.1" 502 "192.168.0.6:8181, test_backend" 0.000 0.000, 0.000
>> 11 [03/May/2017:15:59:07 -0400] "POST /x/y HTTP/1.1" 200 "10.255.222.206:8181" 0.260 0.260
>
>Looking into response status code in access logs is not enough to
>understand if a server is up or down. For at least the following
>reasons:
>
>- there might be over requests currently in flight which are not
> yet logged;
>
>- errors may occur while sending response body, and hence status
> code will not show if there was an error.
>
>It is usually a good idea to look into error logs instead.
>
>--
>Maxim Dounin
>http://nginx.org/
>_______________________________________________
>nginx mailing list
>nginx@nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_upstream_next while no live upstreams

Wu Bingzheng May 10, 2017 04:28AM

Re: proxy_upstream_next while no live upstreams

Maxim Dounin May 10, 2017 08:46AM

Re:Re: proxy_upstream_next while no live upstreams

Wu Bingzheng May 10, 2017 10:30AM

Re: Re: proxy_upstream_next while no live upstreams

Maxim Dounin May 10, 2017 10:44AM

Re:Re: Re: proxy_upstream_next while no live upstreams

Wu Bingzheng May 12, 2017 01:36AM

Re: Re: Re: proxy_upstream_next while no live upstreams

Maxim Dounin May 12, 2017 06:40AM

Re:Re: Re: Re: proxy_upstream_next while no live upstreams

Wu Bingzheng May 13, 2017 12:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 218
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