Home > OS >  Too many Linux TCP connections ESTABLISHED state
Too many Linux TCP connections ESTABLISHED state

Time:09-17


TCP websocket equipment for around $400 after two days will reach this quantity, baidu out Linux TCP tuning are tried not do consult a great god what's the problem

CodePudding user response:

How no one see points too little

CodePudding user response:

ESTABLISHED according to the normal ESTABLISHED connection

400 client, up to 20 times the number of connections, there are two possible:
1, the client resource leaks, have created a successful connection object (or resources) lost for some reason, program is running to create a new connection,
2, between the client and the Server, it is a long connection, communication once in a while, and there may be three layers of equipment in the middle, the TCP session cleaning, cause Server side don't know the connection has been lost,

Generally recommend that on the business agreement to add some heartbeat (cleaning May 2), and the timeout mechanism clear (May 1)

CodePudding user response:

refer to the second floor sazhufa response:
ESTABLISHED according to the normal ESTABLISHED connection

400 client, up to 20 times the number of connections, there are two possible:
1, the client resource leaks, have created a successful connection object (or resources) lost for some reason, program is running to create a new connection,
2, between the client and the Server, it is a long connection, communication once in a while, and there may be three layers of equipment in the middle, the TCP session cleaning, cause Server side don't know the connection has been lost,

Generally recommend that on the business agreement to add some heartbeat (cleaning May 2), and the timeout mechanism clear (May 1)
now I socket is a heartbeat

CodePudding user response:

reference little brother-in-law reply: 3/f
Quote: refer to the second floor sazhufa response:

ESTABLISHED according to the normal ESTABLISHED connection

400 client, up to 20 times the number of connections, there are two possible:
1, the client resource leaks, have created a successful connection object (or resources) lost for some reason, program is running to create a new connection,
2, between the client and the Server, it is a long connection, communication once in a while, and there may be three layers of equipment in the middle, the TCP session cleaning, cause Server side don't know the connection has been lost,

Generally recommend that on the business agreement to add some heartbeat (cleaning May 2), and the timeout mechanism clear (May 1)
my socket is currently a heartbeat


You even don't know these ESTABLISHED connection type, with what think "I Socket is a heartbeat" this sentence means "I have the heart rules, the rules are correct, and this rule has been designed to clean up the useless connection, and the code is absolutely no bug"?

CodePudding user response:

What mistake? The feeling didn't describe clearly

If there is the server to error, and error is the number of connections limit, there will be more clear system log, the default/var/log/messages

If the problem is, need to configure the server machine system parameters,

CodePudding user response:

You this only 400 concurrent, obviously not the number of connections too many reasons

CodePudding user response:

refer to 6th floor Johnblx response:
you only 400 concurrent, obviously not the number of connections too much reason
is not 400 concurrent 400 devices normal news communication
  • Related