Today the system maintenance, found a large number of 499 errors,
499 error
Ngx_string (Ngx_http_error_495_page),/* 495, HTTPS certificate error */
Ngx_string (Ngx_http_error_496_page),/* 496, HTTPS no certificate */
Ngx_string (Ngx_http_error_497_page),/* 497, HTTP to HTTPS */
Ngx_string (Ngx_http_error_404_page),/* 498, Canceled */
ngx_null_string,/* 499, client has closed connection */
As you can see, 499 corresponds to "client has closed connection". This is most likely because the server-side processing time is too long, the client "impatient".
The cause and solution of Nginx 499 error
Open Nginx Access.log found in the last commit is a HTTP1.1 499 0-such error, in Baidu search Nginx 499 error, the result is that the client actively disconnected the connection.
But after my test this is obviously not a client problem, because using the port +ip direct access to the backend server does not exist this problem, and later test Nginx found that if two commits post too fast will appear 499 of the situation, it appears that Nginx is considered to be an insecure connection, actively refused the client connection.
But search-related issues have been unable to find a solution, and finally found on Google on the English Forum on the resolution on this error.
Proxy_ignore_client_abort on;
Don ' t know if this is safe.
Say to configure proxy_ignore_client_abort on;
The agent service side does not actively shut down the client connection.
Configuration restart Nginx, the problem is resolved. Just a slight lack of security, but more than always appear to find the server much better.
Another reason is that I later test found that the client is actually shutting down the connection, or the connection time-out, no matter how many times you set the time-out is useless the PHP process is not enough to improve the number of PHP processes to solve the default test environment to open 5 sub-processes
The cause and solution of Nginx 499 error