In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
There are many situations in which there are 499 errors in the HTTP status code in the log record. One of the situations I encountered is that the nginx is replaced to a backend that cannot be opened. That's it. The log status record is 499 and the number of bytes sent is 0.
There are always users who report the ups and downs of the website system, because the online products have not been modified for a long time, so the problems of the front-end programs can basically be eliminated, so they think that the interface called by Get is unstable, and ask the relevant personnel to say that there is no problem. In order to get the exact evidence, I asked the relevant personnel for the log file of the nginx server (awstats log). After analysis, it is found that there are many errors with an error code of 499 in the log, accounting for about 1% of the entire log file, but it only accounts for about 70% of all errors reported (all errors are reported in the figure below), so all the errors will add up to more than 1%. This amount is still very large.
What is the 499 error? Let's look at the definition in the source code of NGINX:
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 probably because the processing time on the server side is too long and the client side is "impatient".
The cause of Nginx 499 error and its solution
Open Nginx's access.log? Now the last submission is HTTP1.1 499-such an error, in Baidu search nginx 499 error, the result is that the client actively disconnected.
But after my test, this is obviously not a problem for the client, because there is no such problem when using port + IP to directly access the back-end server. Later, the test nginx found that 499 would occur if the post was submitted too quickly. It seems that nginx actively rejected the customer because of the connection that nginx considered to be insecure. The connection.
However, there was no solution to the search-related problems. Finally, an English forum on google was found to have a solution to this error:
Proxy_ignore_client_abort on
Don't know if this is safe.
That is to say, configure the parameter proxy_ignore_client_abort on.
Indicates that the proxy server should not mainly actively close the client connection.
With this configuration, restart nginx, and the problem has been solved. There is only a slight lack of security, but it is much better than not finding the server all the time.
Another reason is that I later tested and found that the client did close the connection, or the connection timed out, no matter how much timeout you set, it turned out that the php process was not enough to improve the number of php processes to solve the default test environment only 5 sub-processes.
The above is the solution to the 499 error under the HTTP 499 status code nginx introduced by the editor of Xiaoyun Network. I hope it will be helpful to you.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.