3

I found this article regarding Linq-to-SQL and SQL Server connection pooling: MSDN Blog

From what I assume from the article, is that Linq-to-SQL using the same Max Pool Size setting just as if it was an ADO object.

I have an C# app that is hitting the database pretty hard. Is there a way to tell if I am hitting my connection limit? How can I tell if my connections are being queued?

2 Answers 2

3

Use performance counters. You should be interested in following counters:

  • NumberOfPooledConnections - how many connections your pool mantain
  • NumberOfActiveConnections - how many connections are in use
  • NumberOfFreeConnections - how many connections are not in use

Last two counters require some modification in your application configuration.

Another article about working with these counters.

Sign up to request clarification or add additional context in comments.

Comments

1

you could open a connection and execute this stored procedure; assuming you use sql server.

EXEC SP_WHO 

you could compare all connections to the dbname with status != sleeping.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.