# Wrong data in $upstream\_status and $upstream\_response\_time

**URL:** <https://www.ruby-forum.com/t/wrong-data-in-upstream-status-and-upstream-response-time/231973>\
**Category:** NGINX\
**Created:** [September 10, 2014, 4:31pm UTC](https://www.ruby-forum.com/t/wrong-data-in-upstream-status-and-upstream-response-time/231973 "2014-09-10T16:31:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 10, 2014, 4:31pm UTC](https://www.ruby-forum.com/t/wrong-data-in-upstream-status-and-upstream-response-time/231973/1 "2014-09-10T16:31:21Z")

</div>

Hey Guys,

We have been using the latest stable Nginx version 1.6.1, and I’ve could  
notice that we might be facing a bug that was supposed to be fixed in  
version 1.5.11.

Bugfix: the $upstream\_status variable might contain wrong data if the  
“proxy\_cache\_use\_stale” or “proxy\_cache\_revalidate” directives were  
used.

On MISS requests the variables “$upstream\_status” and  
“$upstream\_response\_time” are eventually returning wrong data, like the  
example bellow:

$upstream\_status - “504, 504, 200" or even “-, 200"

$upstream\_response\_time - “8.005, 0.242"

As you can see, the data contain two or three values separated by a  
comma,  
and also the $upstream\_response\_time contain two time values, both  
separated  
by comma.

Is that make sense to you guys ? Is it expected ?

Thanks in advance,  
Daniel Biazus

Posted at Nginx Forum:

> **[wrong data in $upstream\_status and $upstream\_response\_time](https://forum.nginx.org/read.php?2,253162,253162#msg-253162)**
>
> Hey Guys, We have been using the latest stable Nginx version 1.6.1, and I've could notice that we might be facing a bug that was supposed to be fixed in version 1.5.11. Bugfix: the $upstream\_status variable might contain wrong data if the...

---

<div class="post-metadata">

**Author:** ![biazus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b3f665/32.png) [@biazus](https://www.ruby-forum.com/u/biazus)\
**Post date:** [September 10, 2014, 7:04pm UTC](https://www.ruby-forum.com/t/wrong-data-in-upstream-status-and-upstream-response-time/231973/2 "2014-09-10T19:04:29Z")

</div>

Hello!

On Wed, Sep 10, 2014 at 10:30:55AM -0400, biazus wrote:

> “$upstream\_response\_time” are eventually returning wrong data, like the  
> Is that make sense to you guys ? Is it expected ?  
> Yes, see [Module ngx\_http\_upstream\_module](http://nginx.org/r/$upstream_addr).

–  
Maxim D.

> **[nginx](http://nginx.org/)**
