We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Connection Pooling in .Net

Thread ID:





57303 Mar 1,2007 07:01 AM UTC Nov 24,2008 05:49 PM UTC ASP.NET Web Forms (Classic) 1
Tags: FAQ
Sachin Gaikwad
Asked On March 1, 2007 07:01 AM UTC

Hello Everyone...,
Can anyone explain me the concept of connection pooling ?
And also , how to use the connection pooling in ASP.Net??

Replied On November 24, 2008 05:49 PM UTC

>Hello Everyone...,
Can anyone explain me the concept of connection pooling ?
And also , how to use the connection pooling in ASP.Net??

Its failry simple....

In a web scenario there exists a lot of operations that require data to be submitted and retrived from database.

If you have a application that does so often then opening and closing a connection everytime will defenetly consume some amount no matter how fast the server is.
This can be saved by connection pooling.
Connection pooling is nothing but a collection of open database connections, whenever a request for the connection comes its first checked against this connection pool, if an connection is availabe then it is returned.
Whenever you close a connection, the closed connection is returned to the connection pool.
This way you save the time require to create and dispose a connection.
By default connection pooling is enabled for sql connection object.
The connection pooling is managed using connection string.
following attribute from the connection string contribute to connction pooling setting.

1 . MinPoolSize = minimum number of connection to be opened.(This is the number of coonection that are opened when 1st request for the connection is made hence making the 1st open connection operation takes some time as compared to subsequent open operations)DEFAULT = 0;
2 . MaxPoolSize = Maximum number of connections that can be left open in a pool.
3 . Pooling = When true connection pooling is enabled. DEFAULT = true.
4 . Connection Life Time : The amount of time for which each connection will be kept in pool.

Be careful when you use Connection pooling as it uses FullText match algorithm, minute means change in connection string wll be responsible for creating new pool.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon