c# - Socket server stops accepting connections after a period of time -


We have an async socket server written in C #. (Windows Web Server 2008 is running on)

It prevents accepting new connections for unknown reason, as long as it works flawlessly.

We have approximately 200 concurrent connections, although we count both the connections made and the connections are removed, these figures can reach more than 10,000 or less than only before 1000 Could! It can last up to 8 hours, sometimes before it stops or can run for about half an hour, at this time we have an application for one hour before it is automatically opened, when it will automatically Backups when it can not connect (absolutely not ideal).

It does not seem that we are running out of chairs because we are closing them properly, we are logging all the errors and before it closes, immediately Not even happening.

Can we understand that anyone has an idea which can happen?

I can paste the code, but usually it just starts the old async / sends the code that you see everywhere.

Who starts active closed, customer or server? If this is the server then you can deposit the socket on the server in the TIME_WAIT position and it can prevent you from accepting new connections. This is more likely if the client connections can stay only a bit and you go during the period when there is a client connection over a long period.

Oh, and if you have TIME_WAIT in the code of socket, please do not assume that the machine-wide time is the best or only solution to change the waiting period.


Comments