Maximum number of simultaneous database connections

Question:

I am using a system monitoring solution and I notice that at peak times the system has about 1500 simultaneous connections. From this data, I searched and I couldn't find where I can check the limit of simultaneous connections with the database.

So how can I set/verify the limit of database connections? Is the connection pool management the responsibility of the database or application? Other than that, what can interfere with the limit of this value?

Answer:

The limit of simultaneous connections may depend on:

  • your bank's version;
  • the configured limit;
  • the capacity of the hardware;

So how can I set/verify the limit of database connections?

The SQL Server maximum limit is 32,767 connections. You can check the configured limit in sys.configurations . Remembering that the limit of connections in SQL Server is per instance and not per database.

Is the connection pool management the responsibility of the database or application?

The connection pooling feature is managed by the application. There are different ORM frameworks that have their own implementation for connection pool management (ADO.NET, Hibernate, etc) or can connect to other connection pool management libraries (c3p0, BoneCp, etc).

If the application indefinitely opens connections to the database, without reusing or closing the ones it has already opened, there will come a time when the database will reach the configured limit or, more commonly, it will gradually slow down the database. Opening a database connection is not a cheap resource.

Other than that, what can interfere with the limit of this value?

The most common is for the database to be slow long before reaching the maximum configured number of connections, usually due to the indiscriminate opening of connections, as explained above.

Scroll to Top