Nginx 499 error problem and resolution

  • 2020-05-10 23:31:43
  • OfStack

Nginx profile

Nginx ("engine x") is a high performance HTTP and reverse proxy server as well as an IMAP/POP3/SMTP server. Nginx was developed by Igor Sysoev, the 2nd most visited Rambler.ru site in Russia. The first public version 0.1.0 was released on October 4, 2004. It distributes its source code as a class BSD license and is known for its stability, rich feature set, sample configuration files, and low system resource consumption. On 1 June 2011, nginx 1.0.4 was released.

Nginx is a lightweight Web server/reverse proxy server and email (IMAP/POP3) proxy server released under the BSD-like protocol. By the Russian program designer Igor Sysoev development, for the entrance of the Russian big website and search engine Rambler (Russian: Р а м б л е р). In fact, the concurrency ability of nginx is indeed better in the same type of web servers. Users of nginx website in mainland China include jingdong, sina, netease, tencent, taobao and so on.

Nginx benefits editing

Nginx can be compiled and run on most Unix like OS and is available as an Windows port. The stable version 1.4.0 of Nginx has been released on April 24, 2013. In general, it is recommended to use the latest stable version as the production version for the new site. The urgency of upgrading the existing site is not high. The source code for Nginx USES 2-clause BSD-like license.

Nginx is a very powerful high performance Web and reverse proxy server with many very superior features:

In the case of high connection concurrency, Nginx is a good alternative to Apache servers: Nginx is one of the software platforms often chosen by web hosting bosses in the us. It can support responses up to 50,000 concurrent connections, thanks to Nginx for selecting epoll and kqueue as our development model.

This paper introduces the reasons and solutions for nginx 499 errors, as follows:

The explanation on the web is that the client actively closed the connection

When uploading a file for a project, nginx log reports 499, and iptables is closed

2. From the method of troubleshooting

nginx- > tomcat, that's the problem
See if the nginx request can be found in the log. This is the post request 499
Check the log of tomcat to see if there are any exceptions

3. Exclude from the network layer, application layer and from the bottom to the top

iptables and network issues

4. Use tools

tcpdump
tcpdump -XvvennSs 0 -i eth0 tcp[20:2]=0x4745 or tcp[20:2]=0x4854 -w /tmp/post.log
tcpdump -i eth0 '((port 8000) and (tcp[(tcp[12] > > 2):4]=0x47455420))' -nnAl -w /tmp/GET.log
0x4745 is an post request

5. Finally, it was found that iptables prohibited the uploading of the ftp address of the attachment, and then ok was added

It's the nginx and tomcat interactions that are not working.


Related articles: