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

D40f05c75ac0efa51d618fe68fad29bd?d=identicon&s=25 Alex Flex (Guest)
on 2013-08-21 00:44
(Received via mailing list)
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]


[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?

A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-08-21 12:44
(Received via mailing list)

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

> [504] [-] [0] [11602] [xx.126.55.81] [GET /weblogin/ HTTP/1.1]
> How can I be sure?


Maxim Dounin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.