I've been asked to take a look at a problem we're having with web service connections not being closed.
My understanding is that after 4 minutes the connections are closed by the server?
I guess the problem is that we are running out of available connections?
I am looking for some advice on some common things to look for in the C# source that may be causing the connections not to close.
How does garbage collection and web services work normally?
Is there a way to ensure that the socket connection closes immediately after the web service call is finished?
I was shown on the server what the unclosed connections look like:
TCP 127.0.0.1:2808 127.0.0.1:28002 ESTABLISHED 2360
TCP 10.1.10.27:5070 22.214.171.124:80 CLOSE_WAIT 1648
TCP 127.0.0.1:4548 127.0.0.1:7031 CLOSE_WAIT 2632
///////////// these connections are not getting closed ///////////////////////////
TCP 10.1.10.27:4887 10.1.10.22:135 TIME_WAIT 0
TCP 10.1.10.27:4888 10.1.10.22:1025 TIME_WAIT 0
TCP 10.1.10.27:4993 10.1.20.2:443 TIME_WAIT 0
TCP 10.1.10.27:4994 10.1.20.2:443 TIME_WAIT 0
TCP 10.1.10.27:4995 10.1.20.2:443 TIME_WAIT 0
TCP 10.1.10.27:4996 10.1.20.2:443 TIME_WAIT 0
TCP 10.1.10.27:4997 10.1.20.2:443 TIME_WAIT 0
From a scalability perspective, some of the people I have spoken to have suggested that this problem has only recently begun to happen because the web service is getting called more often. So, bugs that you might get away with start to come to the surface that were not evident before. They think that is what we are experiencing.