What is the default MaxPoolSize?

I get a terrible error:

Timeout expired. The timeout period elapsed prior to obtaining a connection from 
the pool. This may have occurred because all pooled connections were in use 
and max pool size was reached.

In sql, I see that I open only 116 connections:

SELECT 
    DB_NAME(dbid) as DBName, 
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
FROM
    sys.sysprocesses
WHERE 
    dbid > 0
GROUP BY 
    dbid, loginame
;

116 seems low and I am not currently installing MaxPoolSize. What is the default MaxPoolSize?

I also made sure that all my connections were closed at the end.

+4
source share
3 answers

From MSDN : The maximum pool size is specified (100 by default).

What you have is a timeout error. He suggested that this could be caused by the maximum pool size, but this could happen for many other reasons.

+3
source

You can try adding the following sentence to your connection string Max Pool Size=200to see if this helps.

, , - . , , .

, .

Application Name=xxxx;Data Source=10.10.10.10;Initial Catalog=MyDB;User ID=sa;Password=password;Persist Security Info=True;MultipleActiveResultSets=True;Max Pool Size=200;Connection Lifetime=600;Asynchronous Processing=true;"

,

+2

SQL Server allows 32,767 connections by default. It can be changed using sp_configure. To view the current configuration for this parameter, use the following query:

select * from sys.configurations
where name ='user connections'
-1
source

All Articles