Can a TCP / IP stack be killed programmatically?

Our server application listens on the port, and after a while it no longer accepts incoming connections. (And although I would like to solve this problem, this is not what I am asking here;)

It is strange that when our application stops accepting connections on port 44044, IIS also works on port 8080. Killing our application fixes everything - IIS starts to respond again.

So the question is, can an application spoil the entire TCP / IP stack? Or maybe how an application can do this?

Restless detail: our application is written in C #, under .Net 2.0, on XP / SP2.

Clarification: IIS does not β€œrefuse” connection attempts. He never sees them. Clients receive the message "the server did not respond in a timely manner" (using .Net TCP Client.)

+3
source share
7 answers

Perhaps you can starve on the stack. It is quite easy to merge in conditions of high openness / closing of transactions per second, for example. A web server serving many uncooled requests.

This is caused by the default delay TIME-WAIT - the amount of time that the socket must be closed before it is returned by default to 90 seconds (if I remember correctly)

There are a bunch of registry keys that you can configure - suggest at least the following keys are created / edited

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

TcpTimedWaitDelay = 30
MaxUserPort = 65534 
MaxHashTableSize = 65536 
MaxFreeTcbs = 16000 

Many documents on MSDN and Technet about the function of these keys.

+5
source

Have you increased the availability of available port descriptors?
  netstat -a

I saw something like this when an application opened and closed ports (but did not actually close them correctly).

+4

netstat -a, , . , / "" .

+1

, .

, : , , , "" . , . , ( ), .

, : " TCP/IP?", : "". - .

+1

, RichS .

, TCP/IP , , , . , .

( , , , .)

0

. , - . , , , / . , , .

0
source

In terms of support and sys admin, I saw this only in the rarest cases (more than once), but it certainly can happen.

When you diagnose a problem, you should carefully eliminate the possible causes, and not blindly reboot the system at the first sign of trouble. I just say this because many of the clients I work with are tempted to do this.

0
source

Source: https://habr.com/ru/post/1697515/


All Articles