Nginix 0.5.34 returns 499's for proxied content

Hi,

I just noticed something in our AWStats analysis, a small percentage
(1.7% by awstats’ count) of requests are being returned 499.

71.104.220.183 - - [03/Jan/2008:00:45:56 +1100] “GET /people/dairygirl/
art/506041-1-the-view HTTP/1.1” 499 0
"http://www.redbubble.com/people/dairygirl
" “Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/
523.10.6 (KHTML, like Gecko) Version/3.0.4 Safari/523.10.6”

However the rails production log indicates that it send a 200

Jan 03 00:46:35 xserve1 rails[20472]: Parameters: {“action”=>“show”,
“id”=>“506041-1-the-view”, “controller”=>“artist/art”,
“person_id”=>“dairygirl”}
Jan 03 00:46:35 xserve1 rails[20472]: Completed in 0.06647 (15 reqs/
sec) | Rendering: 0.03452 (51%) | DB: 0.01799 (27%) | 200 OK
[http://www.redbubble.com/people/dairygirl/art/506041-1-the-view
] | Records: 445 | Selects: 25

Visiting the offending URL with curl or firefox+firebug can’t trigger
the problem. Has anyone seen this behavior before?

Cheers

Dave

On Wednesday 02 January 2008, Dave C. wrote:

I just noticed something in our AWStats analysis, a small percentage
(1.7% by awstats’ count) of requests are being returned 499.

special code 499 means client closed connection
before nginx response

Thank you very much. I guess my only question is, can I rewrite this
error code to 200 (as the 499 upsets awstats)

Cheers

Dave

Are you sure you want it to return 200? My understanding is that the
user
never received the content because they closed the connection.

However, from the applications point of view, we handled the request
successfully, and invested processing resources doing so, so it should
be accounted for.

Cheers

Dave

That’s why it returned a 4xx error instead of a 5xx error. 4xx errors
(like
404 - File not found, 403 - Unauthorized) tend to be because the client
has
done something wrong, 5xx errors are when the server did something
wrong.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs