Jump to content

Talk:Connection pool

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Connection pooling and "virtual" connections

[edit]

Interesting to note is how Oracle NetServices realizes connection pooling. It is not just a pool of connections that clients can use : when a connection "owned" by a client is idle after a specified amount of time, the connection is given to another client waiting for a connection, but the connection is still alive and usable by the idle client ! When the idle client has more work to do, the connection is reestablished for that client with another client's idle connection. That's how you can have more virtual client connections than real client connections. I don't know if this is the same functionality on other RDBMS...

Oracle NetServices Connection Pooling

Visual Studio

[edit]

In Visual Studio you can have connection pooling if you use the same connection string. This seems useful if you connection is not closed to allow another user to use the open connection to receive content from a database.

Marc

Moved from bottom of article

[edit]

opening a database connection is a resource intensive and time consuming operation. Connection pooling increases the performance of Web applications by reusing active database connections instead of creating a new connection with every request. Connection pool manager maintains a pool of open database connections. When a new connection requests come in, the pool manager checks if the pool contains any unused connections and returns one if available. If all connections currently in the pool are busy and the maximum pool size has not been reached, the new connection is created and added to the pool. When the pool reaches its maximum size all new connection requests are being queued up until a connection in the pool becomes available or the connection attempt times out.

Connection pooling behavior is controlled by the connection string parameters. The following are four parameters that control most of the connection pooling behavior:

  • Connect Timeout - controls the wait period in seconds when a new connection is requested, if this timeout expires, an exception will be thrown. Default is 15 seconds.
  • Max Pool Size - specifies the maximum size of your connection pool. Default is 100. Most Web sites do not use more than 40 connections under the heaviest load but it depends on how long your database operations take to complete.
  • Min Pool Size - initial number of connections that will be added to the pool upon its creation. Default is zero; however, you may chose to set this to a small number such as 5 if your application needs consistent response times even after it was idle for hours. In this case the first user requests won't have to wait for those database connections to establish.
  • Pooling - controls if your connection pooling on or off. Default as you may've guessed is true. Read on to see when you may use Pooling=false setting. 195.0.192.66 13:00, 17 April 2007 (UTC)[reply]

I don't agree with this sentence "If all the connections are being used, a new connection is made and is added to the pool",beause a pool has a minimom and maximom limitation.when all the connections are being used,the new request is queue until a connection return to pool or TimeOut will be raised.For sure you can check it in <http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx>

Not just databases

[edit]

The article only mentions database connection pooling, but connection pooling is a generic concept that is not only used in conjunction with databases. Should the article mention that, perhaps? DeanHarding (talk) 06:35, 10 January 2008 (UTC)[reply]

This article could probably be merged into Object pool. That article even mentions network and database connections. Having a separate article specifically for connections seems unmerited to me. Hairy Dude (talk) 16:35, 26 February 2010 (UTC)[reply]
I took my hack saw to it. This article was extremely strange. I rewrote most of it to cut down on repetition and the weird editorial point of view that they're only used for database connections for web sites. --71.237.236.28 (talk) 21:18, 27 August 2014 (UTC)[reply]
The bot sniped it as vandalism. We'll wait to see how the appeal goes (finally made an account). --71.237.236.28 (talk) 16:34, 28 August 2014 (UTC)[reply]

Connection pooling for other databases

[edit]

Does connection pooling not exist in MySQL/PGSQL, etc? I believe it does.--rocketrye12 talk/contribs 00:21, 1 June 2010 (UTC)[reply]

Is it the database that supports connection pooling or the language/framework? I would argue that the database is not even aware of the pooling of connections. 216.161.97.70 (talk) 20:00, 8 December 2015 (UTC)[reply]