Questions tagged [connection-pooling]

In software engineering, a connection pool is a cache of connections maintained so that the connections can be reused when future requests to the resource are required.

Description

Connection pools are used to enhance the performance of executing commands on a database or other server. Opening and maintaining a connection for each user especially requests made to a dynamic database-driven website application, is costly and wastes resources.

In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the resource.


Connection Pool libraries

Java

  • HikariCP
    It is considered as one of the best libraries for connection pooling. Play 2.4 Framework uses HikariCP by default.
    Website, GitHub.

  • BoneCP
    It beats older connection pools such as C3P0 and DBCP but should now be considered deprecated in favour of HikariCP.
    Website, GitHub

  • Apache Commons DBCP
    Website.

  • C3P0
    Website, GitHub

3263 questions
1
vote
2 answers

problem regarding maximum pool size in asp.net

I have been working on a small file manager module in a project where a list of folders are shown in a treeview. I have done the whole thing in javascript. Everytime I click a node, a list of data is fetched into a datareader and populated in the…
Paras
  • 2,997
  • 6
  • 35
  • 46
1
vote
1 answer

Get the mongo Pool connection stats in NODE JS

I'm using the MongoDB Pool connection approach to connect my MongoDB using AWS Lambda in NODE JS. I would like to see the number of active pool connections using NODE JS. I found the cmd line way: connPoolStats But How Can I do it using NODE JS?
Harshal
  • 3,562
  • 9
  • 36
  • 65
1
vote
2 answers

Using Statement and Connection Pooling

I recently came to know the concept of 'connection pooling' in .NET, and as such I have a little doubt I would like anyone to clarify it for me. If I use the following piece of code, when will the database connection be returned to the pool so that…
B.M
  • 533
  • 2
  • 8
  • 16
1
vote
1 answer

Is there a way to give dynamic timeouts to Rest Template?

I am using Spring Rest template along with apache's PoolingHttpClientConnectionManager for making API calls. The project in which I am working on requires setting custom timeout for each of the HTTP request I make via rest template. In order to…
1
vote
0 answers

Hikari CP Java springboot getConnection error after some days of deployment

I'm connecting to my postgres instance in springboot and I've implemented Hikari CP for connection pooling . I see after a few days of deployment , my code seems to break I seem to get the following error message in my logs…
1
vote
1 answer

Connection leak (C#/ADO.NET) even though SqlConnection created with using

I have a program that loads a large quantity of data (~800K-1M rows per iteration) in a Task running on the threadpool (see offending code sample below); no more than 4 tasks running concurrently. This is the only place in the program that a…
ww2406
  • 109
  • 9
1
vote
0 answers

sqlalchemy list connections inside connection pool

I made a connection with sqlalchemy to mssql and I used queue pool. I am trying to understand this connetion pool is worked or not. and also I want to see the connections and the queue inside connection pool how can I see? engine =…
newUser
  • 386
  • 5
  • 17
1
vote
1 answer

Should we be using connection pooling with HTTP/2

We recently switched from HTTP/1 to HTTP/2 for our server communication and using OKHTTP library on the client to talk to the server. this.client = new OkHttpClient.Builder() .protocols(Protocol.H2_PRIOR_KNOWLEDGE) …
dogfish
  • 2,646
  • 4
  • 21
  • 37
1
vote
1 answer

Oracle Database Connection Pool with node.js

I am new to Node.js. I am trying to make connection pools with multiple databases. I have successfully made connection pools (i think) with below mentioned code. I know in order to execute query operations i have to do something at "Connection pool…
1
vote
1 answer

NoHttpResponseException is a retriable exception?

We implemented connection pooling in our client code to invoke a server which closes(sends Connection:close in response headers) a connection after 2.5mins. Due to server behaviour we sometimes/intermittently get NoHttpResponseException. And this…
1
vote
0 answers

Mongo DB - Multi Tenant Environment, Connection Pooling with MongoDB.Driver and Asp.Net Core

I am new to Mongo DB, Need inputs on the below use case. We are developing a Asp.Net Core API with Mongo DB as the back-end ( multi-tenant application ), We have a collection in master database which holds the mapping between Client ID and the…
1
vote
1 answer

Ansible opens hundreds of SSH connections instead of reusing a single one

I have a simple-ish ansible playbook which deploys some software on remote hosts. When I run it with -vvv I see hundreds of the following messages: [2020-04-07 17:22:29] <54.234.19.60> ESTABLISH SSH CONNECTION FOR USER: centos Each of those will…
alamar
  • 18,729
  • 4
  • 64
  • 97
1
vote
2 answers

Connection pooling settings in hana-client?

I am trying to create a connection pool using the node module hana-client/hdbext. Is there any way to set the max and min pool size using these modules. Can somebody share a example or a document i can follow for this I am able to connect to Hana…
1
vote
1 answer

TCPListener in golang: error when number of connections is above 60 / 260

I am building TCP Proxy: client <-> proxy <-> Vertica I have a net.TCPListener, which takes incoming requests by AcceptTCP() and creating connections, then, making connection to destination socket by net.DialTCP("tcp", nil, raddr). Looks like a…
1
vote
1 answer

Apache AsyncHttpClient 4.1.4 creating new socket connection instead of reusing connection from Connection pool

We are using Apache AsyncHttpClient having below dependencies [INFO] +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile [INFO] | +-…