0

I am trying to solve non deterministic hangouts in AST.NET application. I have a sneaking suspicion that maxconnection limit is reached.

So my question is how can I verify my suspicion? Is there any performance counter or any method like ThreadPool.GetAvailableThreads to monitor number of simultaneous connections to a remote computer?

Also what does the "number of simultaneous connections" means? As I understand it's count per application domain. However doest it counts socket connection opened in .Net calls?

Jakub Šturc
  • 35,201
  • 25
  • 90
  • 110

1 Answers1

1

You can use Fiddler for monitoring http connections or TCPView For monitoring all the connection of the computer.

I am afraid there is no function for counting available connections, because it does depend on whole network infrastructure. You probably does not run out of connections on your computer, but router somewhere in the network will prevent establishing new connections.

Binus
  • 1,065
  • 7
  • 14
  • I don't think fiddler is a option. First it only works for https(s) and second it's designed to be used as a proxy between browser and internet. I've never heard about usage for asp.net application although setting it as a proxy for web service calls is probably possible. – Jakub Šturc Apr 13 '11 at 14:00
  • I assumed that your ASP.NET application uses http(s) connection. We use fiddler to debug CALDAV connections from our C# application, so it works even outside the browser (for applications reading proxy settings from windows). – Binus Apr 13 '11 at 14:14
  • If you want monitor all the connections, there is an application called TCPView by Sysinternals: http://technet.microsoft.com/en-us/sysinternals/bb897437 – Binus Apr 13 '11 at 14:18
  • If a router had blocked the connection, you'd not be seeing an ASP.NET hang - you'd get a network error. @Jakub: most web services run on HTTP; Fiddler will trap any outgoing Http traffic whether to internet or local network. – Dan Puzey Apr 13 '11 at 15:05
  • @Binus @Dan the hang is caused because .Net use internal connection pooling mechanism and the max pool size is defined in [maxConnection]. For more information about this topic see [this KB](http://support.microsoft.com/kb/821268) – Jakub Šturc Apr 13 '11 at 15:15
  • @Binus @Dan i suppose that most of the connection are call to the internal service which doesn't comunicate via http. For our scenario TCPView works better. However I am no sure if all connection showen by TCPView are counted in maxconnection limit and vice versa. – Jakub Šturc Apr 13 '11 at 15:20