SQLConnection connection pool issue

  • Thread starter Rory Smith via .NET 247
  • Start date
R

Rory Smith via .NET 247

I have a similar problem to several other people who have postedhere - I can only open up to <Max Pool Size> connections. Afterthat I get a timeout expired exception.

Looking at the open / pooled connections in perfmon (in both SQLServer stats, and the CLR runtime), there are never more than 5/ 6 connections open, but without fail, I cannot open more than<Max Pool Size> connections, even when I change this value ordon't specify it.

I have already tried several suggested solutions - disabling SQLServer debugging in VS.net, running in release mode, connectingto several other databases on several other computers, butnothing seems to have any effect. I have gone through the codewith a fine tooth-comb, and put "open connection" counters intomy database class (all the connections are opened and closed bya single pair of shared functions - and yes, the connectionobject is passed by ref.), and ensured that the connections areactually reporting they are closed (via SqlConnection.State)both inside and outside the function that closes them.

I'm all out of ideas now. Any suggestions would be greatlyappreciated.
 
P

Pablo Castro [MS]

Just to make sure I understand your scenario: you set max pool size to say
500, and you cannot open more than 500 connections? if that's the case,
that's intentional, we won't allow the application to open more connections
than the maximum set for the pool. If your issue is that you can open less
connections than the number you set there, then that's bad, and a call-stack
might help identify the problem.

--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

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


I have a similar problem to several other people who have posted here - I
can only open up to <Max Pool Size> connections. After that I get a timeout
expired exception.

Looking at the open / pooled connections in perfmon (in both SQL Server
stats, and the CLR runtime), there are never more than 5 / 6 connections
open, but without fail, I cannot open more than <Max Pool Size> connections,
even when I change this value or don't specify it.

I have already tried several suggested solutions - disabling SQL Server
debugging in VS.net, running in release mode, connecting to several other
databases on several other computers, but nothing seems to have any effect.
I have gone through the code with a fine tooth-comb, and put "open
connection" counters into my database class (all the connections are opened
and closed by a single pair of shared functions - and yes, the connection
object is passed by ref.), and ensured that the connections are actually
reporting they are closed (via SqlConnection.State) both inside and outside
the function that closes them.

I'm all out of ideas now. Any suggestions would be greatly appreciated.
 
A

Anton Sokolovsky

5 open connections is the limitation when you have MSDE version of SQL
Server.


I have a similar problem to several other people who have posted here - I
can only open up to <Max Pool Size> connections. After that I get a timeout
expired exception.

Looking at the open / pooled connections in perfmon (in both SQL Server
stats, and the CLR runtime), there are never more than 5 / 6 connections
open, but without fail, I cannot open more than <Max Pool Size> connections,
even when I change this value or don't specify it.

I have already tried several suggested solutions - disabling SQL Server
debugging in VS.net, running in release mode, connecting to several other
databases on several other computers, but nothing seems to have any effect.
I have gone through the code with a fine tooth-comb, and put "open
connection" counters into my database class (all the connections are opened
and closed by a single pair of shared functions - and yes, the connection
object is passed by ref.), and ensured that the connections are actually
reporting they are closed (via SqlConnection.State) both inside and outside
the function that closes them.

I'm all out of ideas now. Any suggestions would be greatly appreciated.
 
G

Greg Low [MVP]

No, the MSDE has the same open connection limits as SQL Server. Only
concurrent workloads are governed where there are more than 8 of them.

HTH,
 

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