client disconnects

Maxim Dounin mdounin at
Wed Nov 25 21:41:05 UTC 2020


On Wed, Nov 25, 2020 at 11:43:59AM -0800, Frank Liu wrote:

> Thanks for the clarification!
> What would we see if the client disconnects in the middle of nginx sending
> the response? Will there be a "while .." clause in the error log? Will the
> http status code be reset to 499?

As long as nginx is sending the response, the response status is 
already set by the response, and log will say "while sending 
response to client".

The 499 status code can be seen if client closes the connection 
while nginx is sending the request to upstream or waiting for an 
upstream response ("connecting to upstream", "sending request to 
upstream", "reading response header from upstream"), or when a 
request is delayed with limit_req.

Maxim Dounin

More information about the nginx mailing list