Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum Connection Pool Size

I came across below text while reading about Database Connection pool properties:

The maximum pool size property specifies the maximum number of available and borrowed (in use) connections that a pool maintains. If the maximum number of connections are borrowed, no connections will be available until a connection is returned to the pool. This property allows the number of connections in the pool to increase as demand increases. At the same time, the property ensures that the pool doesn't grow to the point of exhausting a system's resources, which ultimately affects an application's performance and availability.

My Question is: When above text talk about 'exhausting system resources' does that mean degrading performance of Database? If answer is yes, why not databases have maximum connection limit that it can withstand without compromising with performance rather than relying on applications to specify proper maximum connection limit? Is there anything in database that says how much concurrent connection it can supports (say for Oracle/SQL Server?)

like image 557
Vicky Avatar asked Apr 26 '11 17:04

Vicky


People also ask

What is the maximum connection pool size in SQL Server?

Hi, By default, SQL Server allows a maximum of 32767 concurrent connections which is the maximum number of users that can simultaneously log in to the SQL server instance.

What is the maximum connection pool size in WebLogic?

Maximum capacity This attribute sets the maximum number of connections your pool can grow to within a single WebLogic Server instance. If you set this value to 27 and you have eight WebLogic Server instances, in theory, WebLogic could create up to 216 database connections.

What happens when max pool size is reached?

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).


1 Answers

In general, the concern about "exhausting system resources" applies to both the application server and the database server. The more database connections you allow, the more concurrent sessions are running on the application server(s), the more RAM the application server(s) VM requires, the more demand is placed on CPUs on application servers and database servers, etc. If the queue of backlogged work gets too big, you may find yourself spending more time swapping processes on and off the CPU and scheduling tasks than in doing useful work. A maximum size on the connection pool allows you to handle an avalanche of traffic or an unexpected performance bottleneck slightly more gracefully by quickly erroring out rather than letting users time out waiting for replies that will never come.

Databases do, in general, have the ability to limit the number of connections they support. Oracle has PROCESSES and SESSIONS parameters, for example, and supports multiple connection architectures (dedicated server and shared server) to let you trade off performance against resource consumption to increase the number of concurrent connections the database can support.

like image 182
Justin Cave Avatar answered Oct 16 '22 05:10

Justin Cave