We have a three-tier application with a C # client, a C # WCF web service level and a SQL Server database. The web service connects to the database using ADO.NET. All of our C # code uses the .NET Framework 2.0.
Recently, a client performed a stress test in our application. During the test, the web server generated many errors, such as:
Failed to connect to database for connection string "...". Timed out. The wait period expires before the operation is completed or the server is not responding.
I know that there are ways to catch connection errors when the connection pool is full, and try to acquire a connection outside the connection pool. We also found several queries that needed to be configured, but they did not take into account the timeouts of the web server connection.
We are trying to find out why the timing web server connected to the database. I configured the web server to enable all ADO.NET performance counters . However, I do not see anything related to the time required for the connection or connection timeouts or the like. Ideally, we could graphically display the connection time in perfmon next to other ADO.NET counters.
Is there a way to track the performance of ADO.NET when acquiring connections?
I suppose we could create our βaverage connection open timeβ performance counter by making temporary attempts to open connections, but I would rather use something that already exists.
source share