Gaurav Saxena

Gaurav Saxena

  • NA
  • 5
  • 911

IIS Application Pool hangs ?

Mar 15 2021 8:29 PM
Hi,
 
I have a web service developed in C# running over Windows 2012 server. This service receives data and connects to destination server  for processing. When it establishes connection with remove server it uses only 20 fixed Source Ports. Every new connection is initialized with one of those 20 fixed Source ports. Problem happens when it uses the last source port. Web service can't use the first port again without restarting application pool. I do not see source ports in TIME_WAIT state as well. Strangely web service starts working again after pool re-start but then works until the 20th port only .  I know we should have dynamic source ports but there is requirement to setup spurce ports only given 20 port numbers.
 
I think code is not doing socket close /cleanup properly and thereby not letting me use the same port again without restarting the pool.  Can somebdoy please help me in any direction where should I check?

Answers (1)