Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default MaxPoolSize?

Tags:

c#

sql-server

I am getting the dreaded 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 only have 116 connections open by running:

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 currently not setting the MaxPoolSize. What is the default MaxPoolSize?

I have also made sure all my connections are closed when finished.

like image 621
PhillyNJ Avatar asked May 19 '15 17:05

PhillyNJ


1 Answers

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

That what you have is a Timeout error. It only suggested that it might have been caused by max pool size being reached, but it could have happened for many other reasons.

like image 63
Gabriel Rainha Avatar answered Oct 19 '22 13:10

Gabriel Rainha