Client closed connection: 400 vs 499
Maxim Dounin
mdounin at mdounin.ru
Mon Jun 15 14:25:51 UTC 2015
Hello!
On Mon, Jun 15, 2015 at 11:20:15AM +0300, Sorin Manole wrote:
> Hello,
>
> It seems that if the client closes the connection during a requests there
> are time when the request is logged as 400 and other times as 499.
>
> Is there a reason for the difference? Serving of the error page cannot be
> it because the connection is closed anyway.
The "400" code means that no correct request was received - that
is, client sent a bad request.
The "499" code means that nginx got a request, but wasn't able to
send a response. That is, client closed connection before we
started sending a response. This, in particular, may happen if a
backend is slow and nginx isn't able to return a response before
the client times out.
The difference may be important when looking into logs.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list