Questions tagged [connection-pooling]

In client applications, a connection pool is a cache of connections maintained so that the connections can be reused when future requests to the resource are required. Many DBMSes also support server-side connection-pooling allowing them to service more concurrent clients than they have server-side processes or threads servicing them.

Connection pooling can drastically improve performance if applications repeatedly open and close connections by not performing costly initialization operations every time.

89 questions
21
votes
2 answers

Connection pools being reset with Error: 18056, Severity: 20, State: 46. & Perfmon Counters not showing

We are using SQL Authentication (to reduce the number of connection pools) & .NET 4.0 connection strings to connect to SQL Server Enterprise Edition 2012 SP1 on a Windows 2008 R2 Enterprise Server: Microsoft SQL Server 2012 (SP1) - 11.0.3000.0…
DamagedGoods
  • 2,591
  • 6
  • 34
  • 48
14
votes
1 answer

What is the purpose of session pool_mode in pgbouncer?

Since in this mode pgbouncer creates outbound connection for each inbound connection it seems to me that pgbouncer doesn't work as pooler. It's just 1 to 1 mapping. Where am I wrong?
skaurus
  • 243
  • 1
  • 2
  • 5
13
votes
2 answers

Feasible to have thousands of users in Postgres?

We are creating SAAS where we will at most have 50.000 customers. We are considering creating a user in the Postgres database for each customer. We will map each user that logs into our service to a user in the database in order to be very sure that…
David
  • 1,195
  • 1
  • 13
  • 27
12
votes
1 answer

Choice of connection pooling library for VM deploys

HickariCP docs say: HikariCP relies heavily on accurate high-resolution timers for both performance and reliability. It is imperative that your server is synchronized with a time-source such as an NTP server. Especially if your server is…
matanox
  • 307
  • 2
  • 3
  • 14
10
votes
3 answers

"When a connection is closed and returned to the pool, the isolation level from the last SET TRANSACTION ISOLATION LEVEL statement is retained"?

The MSDN online article "Snapshot Isolation in SQL Server" states: "An isolation level has connection-wide scope, and once set for a connection with the SET TRANSACTION ISOLATION LEVEL statement, it remains in effect until the connection is closed…
9
votes
3 answers

How to understand the PostgreSQL discrepancy between connection pool recommendation ((2 * n_cores) + n_disks) and support for 100s of connections?

From PostgreSQL docs: Number of Database Connections -> How to Find the Optimal Database Connection Pool Size for optimal throughput the number of active connections should be somewhere near ((core_count * 2) + effective_spindle_count) Tuning…
9
votes
2 answers

Postgres with pgpool architecture

Below is an example pgpool architecture: This implies that you only need to have pgpool on a single server; is this true? When I look at the configuration I also see that you configure backends within pgpool.conf; so it further implies this. But,…
user20459
8
votes
3 answers

Downside of large "max connections" in a connection pool from a web app

I understand that if you don't pool database connections at all, then you bear the overhead of establishing a new database connection every time you need to query the database, which will make your app slow, and that you save that overhead by…
joshua.paling
  • 193
  • 1
  • 1
  • 6
7
votes
2 answers

How to handle connection pooling for massive multi-tenancy/multi-schema environment

Here's a quick run down of the situation: We have 1 Schema per customer. We have 2000+ customers. We have 50+ Database servers (with the above schema's distributed unevenly amongst them). We are creating a true stateless app frontend (i.e.…
adewinter
  • 171
  • 1
  • 2
7
votes
2 answers

Mysql Connection Pooling Similar To PostgreSQL's PgBouncer

I'm looking for a pooling solution for mysql that is independent of the language. I am using PGBouncer as an example because it Resides on the server the database is on Just change the connection string to use the pooling connector No modification…
Devin Dixon
7
votes
2 answers

Verifying connection pooling server side with CONTEXT_INFO on

I'm working with a 3 tiered application, Microsoft Dynamics AX, where the middle tier maintains connections to a SQL Server. Several clients connect to this middle tier server. The middle tier server typically has several connections open to the SQL…
Tom V
  • 15,752
  • 7
  • 66
  • 87
6
votes
2 answers

Cost of Increasing max pool size in SQL Server

We have a public front website that run fine most of the time. But we sometimes experience peaks of connections (like after a mailing campaign) and we were getting error like : Timeout expired. The timeout period elapsed prior to obtaining…
El MoZo
  • 63
  • 1
  • 1
  • 4
6
votes
3 answers

How to handle MySQL database connections/pooling from Lambda -> RDS with Node

I'm running into some problems while testing my Lambda function. I my test, I execute in parallel N executions of my Lambda function. In my lambda function, I retrieve a database connection through Knex. I was messing around with the setting in the…
Austin Gayler
  • 161
  • 1
  • 1
  • 3
6
votes
1 answer

SQL Connection Pooling

I have a .net website connecting to SQL. Just wondering if connection pooling is enabled by default or is it something I have to activate myself?
Tomas Beblar
  • 202
  • 2
  • 9
4
votes
1 answer

Connection Timeouts and Failed Database Connections on AWS RDS

Environment details - Amazon RDS running PostgreSQL 9.3.14, db.r3.xlarge, IOPS 2000, 500 GB Issue - Numerous java.sql.SQLTimeoutException: Timeout after 30000ms of waiting for a connection and java.lang.RuntimeException: Failed to get a database…
1
2 3 4 5 6