open connections using ado.net

P

Pat Capozzi

We have built a web app which we subjected to a stress
test after which we checked sql server Management -
Current

Activity - Process Info and found quite a few open
connection that were taggedd "sleeping" and "awaiting
command".

Does this mean these are "orphaned connections"? We have
meticiously closed our data table connections in the data

layer and the data readers after we finished with them in
the app.

Thanks for the help on this.

PatC
 
H

Hussein Abuthuraya[MSFT]

Pat,

What you are seeing is because of "Connection pooling" that is On by default for all .NET Data Providers. As long as the process that created the pool is still alive, the pool
will remain alive. Closing a connection will not remove the physical connection, it would send it back to the pool to be available for other Connection requests.

So in a web App, the IIS process (DLLhost or Inetinfo) remain alive even after closing the App. If after calling iisrest or recycling iis, the connections remain there then there is
a problem. If they disappear then you are OK.

I hope this helps!


Thanks,
Hussein Abuthuraya
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
P

pat capozzi

Thanks,That helps tremendously. I reset IIS and they went away so I am
assuming that they are not orphan connections.

PatC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top