nginx 499 status code

The 499 error code is a status code defined by nginx itself, which is usually caused by the client actively disconnecting.

The nginx source code is defined as follows

ngx_null_string, / 499, client has closed connection /

One possibility is that the server takes too long to process the request and the client actively closes the connection.

The temporary solution is to change the proxy_ignore_client_abort parameter to on

This means that the agent should not actively close the client's connection. When the client actively disconnects, nginx will not record 499. It will wait for the backend server to process the request, and then record the backend's return information to the log.

However, this operation is not recommended, because when a large number of connections are disconnected momentarily, it will cause excessive server pressure and waste resources, which is not very safe.

 

If there are a large number of 499s, you need to investigate what causes the server to process requests too slowly. It may be caused by the server itself, or it may be caused by the network.

Guess you like

Origin blog.csdn.net/weixin_42182501/article/details/101434827