.NET monitoreando el número de conexiones simultáneas

I've seen a variety of resources on the web recommending that if I have an app making lots of web service calls, to modify the web.config with a section like this:

<system.net>
    <connectionManagement>
      <add address="*" maxconnection="40" />
    </connectionManagement>
  </system.net>

Is there a way with Windows or SysInternals tools to monitor/log the currently used connections to see if this really is a problem?

preguntado el 31 de julio de 12 a las 12:07

1 Respuestas

It depends on what you are connecting to/from; see if you experience any errors under load/load testing. You can also run a quick netstat command to see how many connections you have at any given moment.

Lo haría no recommend fiddling with such settings unless you have a specific reason to, however. For instance, if there is a limit on concurrent connections to the web service you are using. (many public services will have such limits, for example)

Respondido 31 Jul 12, 12:07

We aren't currently experiencing errors in load testing, but we are experiencing slow performance in the test, and trying to track down the source. I think you're the first person other than myself to recommend not changing the setting without knowing that's the issue. netstat looks like it may be helpful - joelt

@joelt Sounds like you have the right idea; don't go fiddling with stuff until you have the actual issue tracked down. Does the performance issue increase as load testing progresses? (that is, does it start out OK, but then get slow as real load starts to hit... suggesting the service's connection pool is filling up), or is the performance issue right from the first request? Or, does the performance issue even occur on basic, single-instance testing, too? (which would essentially rule out connection count as a problem, unless one request is generating many more) - Andrew barbero

well, we ended up making the change and it didn't help, but we could see that the connections we could monitor with netstat weren't limited by the config setting anyway - joelt

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.