This is my database connection string. I did not set max pool size until now.
public static string srConnectionString = "server=localhost;database=mydb;uid=sa;pwd=mypw;";
So currently how many connections does my application support? What is the correct syntax for increasing the connection pool size?
The application is written in C# 4.0.
A connection pool is created for each unique connection string. When a pool is created, multiple connection objects are created and added to the pool so that the minimum pool size requirement is satisfied. Connections are added to the pool as needed, up to the maximum pool size specified (100 is the default).
This may have occurred because all pooled connections were in use and max pool size was reached. When you receive this message, it means that your website is using all of its available SQL Database connections (the default limit is 15 connections per DotNetNuke install).
Using connection pools helps to both alleviate connection management overhead and decrease development tasks for data access. Each time an application attempts to access a backend store (such as a database), it requires resources to create, maintain, and release a connection to that datastore.
To set the maximum pool size: n is the number of connections allowed per pool, from 1 to 2,147,483,647 (the default). The number of connections is limited by the number of connections supported by your database driver.
Currently your application support 100 connections in pool. Here is what conn string will look like if you want to increase it to 200:
public static string srConnectionString = "server=localhost;database=mydb;uid=sa;pwd=mypw;Max Pool Size=200;";
You can investigate how many connections with database your application use, by executing sp_who
procedure in your database. In most cases default connection pool size will be enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With