Welcome! Log In Create A New Profile

Advanced

Re: How to distinguish if nginx generated a 504 error or upstream returned it?

Maxim Dounin
August 21, 2013 06:44AM
Hello!

On Tue, Aug 20, 2013 at 04:43:40PM -0600, Alex Flex wrote:

> Hello !
>
> I run nginx as a reverse proxy and send requests to an upstream
> server, the problem is according to my logs sometimes i start seeing
> this:
>
> [499] [-] [0] [11602] [xx.126.55.81] [GET /weblogin/ HTTP/1.1]
>
> or
>
> [504] [-] [0] [11602] [xx.126.55.81] [GET /weblogin/ HTTP/1.1]
>
> The first field is the $status, the second is the
> $upstream_cache_status. So I know for a fact these two requests did
> go to the upstream server however what i dont know is who returned
> the 504 and 499 codes. My server or the upstream ?
>
> I know I can implement $request_time to try to "guess" using my
> timeouts and assume if they where generated below them that it may
> be the upstream that for whatever reason served the request with
> that code.
>
> How can I be sure?

$upstream_status?

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to distinguish if nginx generated a 504 error or upstream returned it?

Alex Flex August 20, 2013 06:44PM

Re: How to distinguish if nginx generated a 504 error or upstream returned it?

Maxim Dounin August 21, 2013 06:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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