After hearing the odd message gateway server migration from Beijing to Wuxi room, issued after the emergence of SMS, SMS status report receiving only about 60%.
By understanding the business logic, the haproxy through the stats page to see the status of the following statistics
Session has reached the maximum number of 4096, and my haproxy.cfg file maxconn is 2000. Of course, the number of connections is not enough. In fact, the back-end messaging server has been given, the server is also being given the front page, but we did not communicate on this issue too. Cause this problem lasted nearly a month to solve them together.
So decisive modify 5000. reload the configuration, the number of connections go up. But reset connection resp part or continue to rise. Why is it?
Use ulimit -n and found open files is the default 1024, decisive modification 50000, can not be bigger. A period of observation, resp found that although the growth rate decreased, but still there. Then adjust the parameters:
net.ipv4.tcp_fin_timeout = 5
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 10240 61000
After editing, and then observed for some time, I found that it was finally quiet. resp consistently zero.
Of course, this intermediate process lasted two days to resolve.