我可以find437 SYNs to LISTEN sockets dropped从我运行nginx的服务器上的服务器上的netstat -s 437 SYNs to LISTEN sockets dropped 。
我从man page中find了这个解释:– --statistics, -s, Display summary statistics for each protocol.
那么437这个数字是什么意思?这是一段时间内的快照还是总结?
非常感谢。
Nginx非常快速地接受连接,但是在stream量极高的情况下,连接积压仍然会在系统级发生(这是应用程序级连接处理的一个明显瓶颈)。当发生这种情况时,新的连接将被拒绝。
“丢弃SYN信号的套接字”是Nginx丢弃数据包的一个症状。 我的build议是首先使用ngx_http_stub_status_module [1]监视Nginx活动连接。 然后确定当前系统范围内打开的文件描述符并相应地调整内核参数。
连接队列的大小可以通过修改somaxconn和tcp_max_syn_backlog内核variables来增加。 请参考这些宝贵的资源[2] [3]了解更多信息。
[1] https://nginx.org/en/docs/http/ngx_http_stub_status_module.html
[2] http://engineering.chartbeat.com/2014/01/02/part-1-lessons-learned-tuning-tcp-and-nginx-in-ec2/
[3] https://www.scalyr.com/community/guides/how-to-monitor-nginx-the-essential-guide