wrong values for $upstream_response_time in add_header?

Christian Bönning christian.boenning at gmail.com
Fri May 4 08:19:49 UTC 2012


I'm cross-posting this from the forums to the mailinglist in hope for
getting a reply here. Sorry for that.

I'm using nginx-1.2.0 (plus upstream-fair and headers-more; for
complete `nginx -V` and `uname -a` please see
https://gist.github.com/be4a86dbfdae516a4efe) and I'm really happy
with that. However I want to add a couple of Headers
($upstream_response_time in this case) to be passed to the Client for
debugging purposes. So I've added `add_header X-AppServer-Response
$upstream_response_time;` to my location block where I do all my proxy
stuff. I've got an upstream block where I've put in my 3 backend
servers. All Backends respond very fast during testing.

However there are unreasonable high values within this header
(X-AppServer-Response: 74768.562 in this case). I'm using access_log
to get some more values written to disk as well for central
monitoring. Within this log all values seem to be ok (for this
particular request it's 0.002 to be exact).

I was able to reproduce that behaviour using different backends
(apache2 and another nginx in this case).

Any Idea what's going wrong here?


More information about the nginx mailing list