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.
3,169
questions
-1
votes
2
answers
41
views
C# Connection pool issue: The timeout period elapsed prior to obtaining a connection from the pool
OrmLiteConnectionFactory is responsible for creating a new SqlConnection.
MaxConnectionPoolSize = 100. PoolSize < 50.
Code that creates a new connection:
services.AddSingleton<...
0
votes
0
answers
27
views
Sequelize: Connection pooling & horizontal scaling
I have an understanding of how connection pools are working.
My question is specifically for Sequelize. For example, lets say that we have the following configuration object:
pool: {
max: 5,
...
-1
votes
0
answers
30
views
Postgres connection pool, when to use
I'm calling a script from another python script which does CRUD operation over the db, it's not in a flask/django environment but I just trigger it in threaded mode as I expect n number of hits/minute....
0
votes
0
answers
20
views
Vertx connection pooling issue, high value of vertx_sql_queue_pending
I am very new to Vertx, so please excuse me if this is a very basic question. I am facing issues with Vertx connection pool, I am using io.vertx:vertx-pg-client with Vertx version 4.2.7.
After ...
0
votes
1
answer
61
views
JedisPool vs JedisPooled
Looking at the Jedis Getting Started, I understand it's better to use connection pools to be threadsafe. To do so, I would need a JedisPool and a try-with-resources statement like so:
try (Jedis jedis ...
-1
votes
0
answers
12
views
Loss socket connection in Nextjs
I need to refresh my next.js app to establish connection between two browser for message.
whenever I change or navigate to another route or another screen i lost socket connection and my messaging ...
1
vote
2
answers
59
views
Unable to find suitable method for property URL? ComboPooledDataSource, Spring Boot DataSourceBuilder 2.7.0
I am upgrading to spring boot 2.7.0 from 2.3.12.RELEASE as that has vulnerabilities.
My application uses c3p0 for connection pooling and I need to keep using that.
Caused by: org.springframework.boot....
0
votes
1
answer
37
views
Can you force Npgsql to reset all pooled connections or update search path for active connections after some trigger?
Here's our issue. Every day, we update our search path by replacing a schema with another.
So if today our search path would be public, alpha, tomorrow it will be public, beta, then back to public, ...
0
votes
0
answers
26
views
Could SimpleConnectionPool method work with a pgpass file?
I'm trying to create a connection pool using SimpleConnectionPool method but without specifying a password. As the theory goes, libpq should check user's home directory in order to read the passfile ...
0
votes
0
answers
18
views
Tomcat JDBC PoolExhaustedException
I have production servers running with the configuration, running just fine
Websphere application server
JDK 5
Oracle 11 Database
I have to migrate this to new tech for business purpose, new tech ...
0
votes
2
answers
68
views
Java Spring Number of database connections per thread
I was wondering whether we have a limitation on number of connection each Java thread can open to the database.
Because when I try to execute a transaction using Propagation.REQUIRES_NEW which I ...
0
votes
0
answers
20
views
C# .Net 5 System.Data Connection Pooling - Clarification for high level method that opens a connection
First off, prior to asking this question I have been researching connection pooling for the better part of my morning. What I've found is that is turned on by default, handled by the application/...
0
votes
0
answers
15
views
BasicDataSource fails after 8 connections allocated
I'm using BasicDataSource (org.apache.commons.dbcp2.BasicDataSource) with a local MySQL database. My application is a Java web service running under Tomcat 8 on an AWS Linux server.
No matter how I ...
0
votes
1
answer
63
views
How to log Websphere connection pool information like active connections in spring boot application
We are using Websphere liberty 20.0.0.12 and spring boot (parent) version 2.0.5.
I can find the connection pool information in the JConsole.
How can I print Websphere connection pool information in ...
0
votes
0
answers
20
views
MaxConnectionIdleTime or MaxConnectionLifeTime not closing connections for mongo from the application. Mongo db version 3.2
Connections are not getting closed in app service after maxconnectionidletime or maxconnectionlifetime even though i am using the supported mongo drive 2.11 and mongo db 3.2. I am opening 500 ...
0
votes
0
answers
32
views
Does Entity framework by default use connection from the ado.net's pool of 100 (default) connections?
Entity Framework uses ado.net behind the scenes.
Ado.net by default maintains a pool of 100 connections with the sql server per connection string (https://docs.microsoft.com/en-us/dotnet/framework/...
0
votes
0
answers
32
views
How to decide maxIdle properties in DB connection pooling configuration?
I am using tomcat jdbc for DB connection pooling. recently i have increased my maxActive property after frequent connection pool exhaust issue (when application under heavy load) so decided to ...
-2
votes
1
answer
56
views
too many open files in Redis
In our project, we are using a single instance of Redis (hosted on GCP) with total memory of 4 GB, out of which only 2 GB is used as of now. The total connection limit is 1000. A few days ago, we ...
3
votes
1
answer
51
views
How to obtain JPA Connection Pool Statistics in EclipseLink?
I am currently working on Dropwizard framework project with EclipseLink JPA. I need to get connection pool statistics such as the number of active connections, the total number of connections, etc. I ...
1
vote
0
answers
18
views
How to add multiple joins in the same query for pool.query Nodejs connection?
I'm building an Accounting Web Project using Nodejs and Express and I have to connect three tables from my database: parametro, tipoparametro and clasificacion.
My original query allows two tables to ...
0
votes
0
answers
26
views
what is mongoose connection validity time?
I have custom circuit breaker logic for 3rd party services. I checked mongoose connection status like below,
mongoose.connection.on("connected", function() {
console.log("Mongoose ...
0
votes
1
answer
26
views
does finally block always run in generator?
in sqlalchemy i make use of sessions in the following manner:
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.orm import Session, sessionmaker
from app.core....
0
votes
1
answer
25
views
Open or close the connection instantly after DB operation or use same connection throughout method
i am working on a java web application where Database connection pooling is managed by tomcat-jdbc. I need to know which one is best practice
1.use same connection for multiple DB interactions in same ...
1
vote
3
answers
100
views
In Golang http client, what does Host mean in MaxConnsPerHost and MaxIdleConnsPerHost?
In MaxConnsPerHost and MaxIdleConnsPerHost in GO HTTP package, is "Host" a domain(i.e., yahoo.com) or an IP address? The actual meaning of "Host" will affect my settings for the ...
0
votes
0
answers
21
views
Using netty connection pools with keep alive and multiple different target URLs how does the correct connection get chosen?
With netty webclient set up use keep-alives and a connection pool if I make a request to ServerA then a connection will created and kept alive, then I make a request to ServerB presumably a new ...
0
votes
1
answer
35
views
MySQL Node.js module: Unable to create connection pool. Error: Access denied for user
I am trying to create a connection pool using:
mysql.createPool(dbConnOptions)
My dbConnOptions object is:
var dbConnOptions = {
host: '192.168.5.11',
...
2
votes
0
answers
46
views
gunicorn / pre-fork with sync workers and database connections
I have a question related to this older question:
What exactly is a pre-fork web server model?
We had an internal discussion and a more senior dev insisted I was wrong. The disuccsion was around ...
2
votes
6
answers
218
views
How costly is opening and closing of a DB connection in Connection Pool?
If we use any connection pooling framework or Tomcat JDBC pool then how much it is costly to open and close the DB connection?
Is it a good practice to frequently open and close the DB connection ...
0
votes
0
answers
48
views
How to share a DB connection pool in Python multiprocessing?
I'm using multiprocessing.Pool to execute some function. And in the function I need to connect to database (using sqlalchemy). I try to share the sqlalchemy connection pool to child processes by using ...
0
votes
0
answers
53
views
PGBouncer connection pooling for Multiple Spring boot Applications connecting to same Postgres DB?
Just want to validate if this scenario of PG bouncer Connection pooling is possible
Have A and B spring boot application connecting to the same DB (only read operations)
Does PGbouncer share ...
1
vote
1
answer
49
views
Connection pooling for same connection string but from different hosts/IP in SQL Server, ADO.NET
I have explored the concept of connection pooling and Max Pool size for SQL Server and it says that for same connection string SQL Server will open the new connections in same pool.
Now, we have two ...
0
votes
0
answers
23
views
What is equivalent to HikariCP in. Net core 3.1?
In Java we have something called connection pooling ie HikariCP or DBCP..
I am currently working on the. Net core 3.1 project that leverages Entity framework and SQL server and Cosmos database.
I don'...
0
votes
1
answer
39
views
How to configuration Oracle connection pool in ActiveMQ
I want to configure the number of connection pools in ActiveMQ for the Oracle database. What should I do for this purpose? My current configuration is as follows:
<bean id="oracle-ds" ...
0
votes
0
answers
129
views
R2dbc pool dependency version to use with spring and oracle
I'm trying to create a pool of connections to Oracle using r2dbc-pool, r2dbc-oracle and spring-boot-starter-web, spring-boot-starter-data-r2dbc,ojdbc11, etc. The problem I have is that r2dbc-oracle ...
1
vote
1
answer
81
views
How to send data from model to controller node js
I am calling getIndex function in contoller from routes and fetchAll from model is getting data from database but how to store the data and send it to contoller and how to receive in contoller.
This ...
0
votes
0
answers
81
views
Connection Pooling with knex but Idle Connections stay alive
I'm using knex w/ pg and the following configuration (trying to kill idle connection ASAP),
but the stay alive for very very long (more than minutes).
const knex = require('knex')({
client: 'pg',
...
0
votes
0
answers
162
views
Connection pool in Envoy proxy
I have configurated Envoy to be my proxy to the redis database, but I'm struggling at the connection pool option which is the most important thing that I need right now.
the following file shows the ...
0
votes
0
answers
64
views
ArangoDB Connection Pool Implementation in Microservices Architecture
For learning purposes, I decided to create a micro services based architecture application, and I want each independent app to have its own DB Connection pool. I am confused however as to how to ...
1
vote
0
answers
91
views
Are there any benefits of using PgBouncer with Session pool mode vs default pooling from Entity Framework?
I am currently migrating Postgresql installed on an Azure VM to Azure Postgres Flexible Server. One of the advantages is the ability to use PgBouncer, unfortunately in my case it is not possible to ...
0
votes
1
answer
77
views
Nginx send all connections to server A before going to Server B before going to server C..etc
I am using nginx to balance connections to backend tcp servers using the stream directive. I have two separate questions in regards to balancing the connections as the default algorithms don't seem to ...
0
votes
1
answer
47
views
Is there a library to share Oracle Connection Pools across multiple servers?
Are there open-source solutions to share Oracle connection pools across server instances so application instances don't suck up limited connections? For example say I have a limit of 100 connections ...
0
votes
0
answers
22
views
How do I convert (node js) sequential processing of AWS log stream to mysql local db to parallel processing, without Error: Pool is closed. message?
The node js code operates as follows;
fnGetLogEvents() calls AWS GetLogEventsCommand to get the events of the log stream
putCloudwatchLog is called to convert each dynoPObj object, one of the events, ...
0
votes
1
answer
33
views
What are the differences (CPU, runtime, or otherwise) between using pg pool and pgp as a database connection in an express server
I've created a few apps which utilize a postgres database, but in all of those projects, I've either used the pool or client function from the pg npm package. Recently I came across the pg-promise ...
0
votes
0
answers
158
views
Cannot close a pool while it is connecting?
I am trying to implement some queries in my server code, but am facing this error:
setImmediate(callback, new ConnectionError('Cannot close a pool while it is connecting'))
ConnectionError: Cannot ...
0
votes
0
answers
162
views
How to reuse connections or use connection pooling in GraphQL of Apollo-server REST datasource
I have a GraphQL server with apollo-server and apollo-datasource-rest as library to handle REST datasource connections.
I am facing an issue of opening too many connections from GraphQL to my cloud ...
0
votes
0
answers
171
views
actuator health check service is restarting after configuring the hickari cp configuration in springboot application
i have configured hickari cp connection pool configuration in my soring boot application, after that the randomly health check service is failing/taking more time than configures (60sec), tried all ...
3
votes
0
answers
87
views
How can i use connection pool in perl-redis
I'm currently using the Perl language and the Mojo framework, and Redis-1.999(https://metacpan.org/pod/Redis) library.
If I want to use a connection pool, do I have to implement the objects associated ...
5
votes
1
answer
2k
views
The right way to DI NpgsqlConnection postgreSQL with multiple connectionString in ASP.NET Core 3.1
I'm struggling to register DI NpgsqlConnection() with multiple connection strings in ASP.NET Core 3.1, Dapper v2.0.78 & Postgres v11.
I will provide the current state & fix the code below:
...
0
votes
0
answers
197
views
Bitnami Postgres-HA load balancing, replication and too many connections
We have .net core based application which is deployed in kubernetes and we have Postgres HA deployed on same cluster along with pgpool-2 for connection pooling. We are facing lot of errors on our ...
0
votes
0
answers
27
views
How to close static ComboPooledDataSource
I have a class with a static ComboPooledDataSource field which I initialize in the static block
public class MyDataSource {
private static ComboPooledDataSource cpds = new ComboPooledDataSource();...