Questions tagged [connection-pooling]

1

votes
0

answer
12

Views

Seeking advice on technologies to use for a project: ORMs, Building reactive interfaces, etc

My friend and I are starting a relatively ambitious long term project and we require some assistance deciding which technologies would be best suited for our needs. We would be very grateful for any advice or opinions on which technologies would be best suited for our project. Below is some informat...
zbbz
0

votes
0

answer
10

Views

How to change the username/password and database runtime using HikariCP

I have a multi tenant application that tries to connect to database per tenant and each database will have its own username/password. I want to achieve this using a single datasource by switching between the datasources and users. I tried to set the username and password at runtime on getting the co...
Srik91
1

votes
1

answer
438

Views

Connection pooling on server vs application

What is difference between doing connection pooling settings in application code like shown in below link vs doing on the server itself like shown in the second link for weblogic? http://javarevisited.blogspot.com/2012/06/jdbc-database-connection-pool-in-spring.html https://docs.oracle.com/cd/E13222...
NaiveCoder
1

votes
1

answer
209

Views

DBCP Connection Pool Active connections not closed

I am using DBCP connection pool and I have created a MBean to show the connection pool stats in Jconsole. What I have observed is that even if there is no activity on the application (means no page click, etc) the connection pool stats shows active connections. The 16 NumActive connections we see ab...
NaiveCoder
1

votes
1

answer
121

Views

CloseableHttpClient doesn't use sslcontext

I use PoolingHttpClientconnectionManager and i need specific sslcontext on each request. By default CloseableHttpClient use manager's sslcontext, but i need sslcontext from .setSSLContext(context). How resolve this problem? I need connection pool and at the same time i need specific sslcontext on ea...
Shirvan
1

votes
2

answer
57

Views

“Incorrect SQLSTATE given to is_truncated_warning.” using PHP with SQLSRV in Debian Linux

I am using Microsoft's ODBC Driver (version 17) for SQL Server on a development server. With connection pooling off, the application runs unacceptable slowly. If I turn connection pooling on, the application runs much faster, but one particularly query-heavy page executes about five queries successf...
iaina
1

votes
0

answer
187

Views

The timeout period elapsed prior to completion of the operation error with 1000 seconds

I have 24 millions records in source(12 millions) and target(12 millions) and i am trying to compare records between source and target. Error : Timeout expired. The timeout period elapsed prior to completion of the operation When i run my Test method for once then it is working fine but when i have...
ILoveStackoverflow
1

votes
0

answer
56

Views

Using mysql & pools in node.js in a cleaner way?

I would like to know if there is a more shorter or elegant way to do mysql requests in node.js (using pools) Actually this is how i do multiple requests (i simplified the code for the example, see my comments inside) : var Mysql = require('mysql'); //Creating the pool of sql connections var Pool = M...
Owow
1

votes
0

answer
78

Views

Passport.js Authentication within Express.js seems to be broken after implementing db connection pooling

Really confuse why my app login behaviour seems to be weird after i implemented pooling. Everything was fine when i use createConnection() instead of createPool() method inside my db configuration. The 'weird' behaviour appears when i clear all of the session that stored in database( I use mysql sto...
hfbachri_
1

votes
0

answer
88

Views

InterfaceError (0, '') when using adbapi.ConnectionPool

I use database connection pool provided by adbapi of twisted.enterprise to realize the parallel database writes as follows dbpool = adbapi.ConnectionPool('pymysql', **config) query = dbpool.runInteraction(insert, item) query.addErrback(handler_error) def insert(cursor, item): cursor.execute('SELECT...
Minping Zhou
1

votes
1

answer
55

Views

Datasource connection pooling for CORDA V3

When configuring a JDBC Datasource in the configuration file for CORDA, could a database connection pool be used such as the Apache Commons connection pool used on Java application servers? Would this even provide any advantage since CORDA itself might be providing object pooling for the node?
Kevin Peterson
1

votes
0

answer
472

Views

Timeout while receiving message with Mongo Connection pooling using java

Production we are connecting with Mongo DB using java (connection Pooling). every day We are getting almost 500 requests below error (MongoSocketReadTimeoutException) and we are not using any complex query also.is it because of stale Mongo connection ? I didn't understand problem with code (or) M...
Narasimha
1

votes
1

answer
112

Views

How many pools per session for Cassandra Java Driver?

I was reading this article on Cassandra connection pooling, and it says: For each Session, there is one connection pool per connected host But then it has the following diagram which shows 1-n on Session-Pool: So, how many pools per session the driver manages after all? Is this customizable?
Pedro Gordo
1

votes
0

answer
66

Views

How do I destroy ibatis connection pool?

I am using ibatis 2.3.4.726. implementing use case where I need to create and destroy DB connection pool in a loop, as a part of some DB diagnostic experiment. could not find any API that destroys a DB connection pool. Appreciate any pointers. Thanks
otto
1

votes
0

answer
699

Views

Connection pooling in MongoDB

Working on NodeJS backed with a MongoDB database which uses the connection pooling of MongoDB. Having a question regarding the amount of opened connections. When we connect to mongoDB database in NodeJS with the following code: MongoClient.connect(url, { poolSize: 25 },function(err, db) { console....
1

votes
0

answer
10

Views

org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData

I have created a micro service and it runs fine in production for 3-4 weeks. Its a low volume service with few calls every couple of days. After 3-4 weeks all requests starts failing with below message in the logs 2019-04-15T22:33:17.628901587Z 2019-04-15 22:33:17.627 WARN 1 --- [nio-8080-exec-5] o...
user11380842
1

votes
1

answer
207

Views

JNDI connection pool

I am currently working on java project which is based on struts and tomcat 7.Now due to memory reasons I am planning to convert the project from using normal JDBC/ODBC connections to JNDI connection pooling.Am kind of stuck here.What are the basic changes that I should make in the code as part of th...
Aishwara S
1

votes
0

answer
32

Views

Tomcat jdbc connection pool - idle connection is not created after abandoned was removed

I've configured to have a least 10 idle connections in my connection pool. Sometimes due to unknown reason I there are some abandoned connections that are stuck. To remove then I added configuredDataSource.getPoolProperties().setRemoveAbandonedTimeout(300); configuredDataSource.getPoolProperties()...
Vitalii
1

votes
1

answer
32

Views

How do you query different databases located on the same host with one pool connection and dplyr in R?

Thus far, I have been creating a separate pool for each MySQL database on the server and using dplyr to query them like this: p1
user9001
1

votes
0

answer
182

Views

Connection is closed

am working on dbcp connection pooling which I am trying to implement in an existing Java application(implemented in struts). I have noticed that in my java application none of the connections are closed. I am now trying to close those connections. The problem is whenever I use connection.close() I a...
Aishwara S
1

votes
0

answer
44

Views

Per-user data-source connection pools (via security-domain) in jboss-6.0.0.Final vs wildfly-10.1.0.Final

Back with Jboss-6.0.0.Final we had the following data-source/pool definition : pgsql true org.postgresql.xa.PGXADataSource localhost 5432 somedb postgresqluser 0 5 The definition for security-domain postgresqluser was: jboss.jca:service=XATxCM,name=pgsql So this gave us one pool per user with max...
panix Panixgr
1

votes
0

answer
343

Views

Understanding ADO.NET 'Connection Lifetime'

I've come across a high-traffic app which occasionally hits various scaling timeout issues I'm trying to diagnose. The app has these settings in the SQL connection string: Min Pool Size=5;Max Pool Size=100;Connect Timeout=8;Connection Lifetime=30; This of course means there are a minimum of 5 connec...
FBryant87
1

votes
1

answer
56

Views

What is the optimal connection pool max for Heroku Postgres' 'Standard-0' database?

I'm just configuring a system for production and we have chosen Heroku's Postgres Standard-0 as the database. This states the maximum connections is 120 but I am aware that this does not mean I can set Sequelize's POOL_MAX to 120 as there are other considerations. From experience, what would be an...
Dave Sag
1

votes
0

answer
37

Views

System accumulates busy after a PostgreSQL migration. Same Tomcat7 and system files as before

I migrated a system to other machines with a new version of Postgres. (8.2.23 to 9.4.5) (We tested new version for a long time and solved some compatibility errors). The application has the same files (same server: tomcat7) and users are using the same tasks that they performed before. I monitoring...
1

votes
0

answer
438

Views

Tomcat jdbc connection pool not enforcing testOnBorrow and/or validationQueryTimeout

I have an issue on a jdbc connection pool on Tomcat/7.0.8: It seems like it's not enforcing the testOnBorrow and/or validationQueryTimeout parameters. The Tomcat server has the following JDBC resource defined: Before introducing connectivity issues with the database, Tomcat process has 2 DB connecti...
befo88
1

votes
0

answer
150

Views

jdbc OracleDataSource not releasing connection after executing statement

I am using below setup for fetching data from oracle DB and connection pooling. When I do getConnection on this setup, oracle data source always creates new connection and returns, until max limit is reached. Even if I finished executing the statement. how do I release connection? I know I can use a...
Bikas Katwal
1

votes
0

answer
36

Views

Spring : How to manually reset connection pool's connection?

I am trying to validate the database health manually using @Aspect. And if something happened in DatabaseA (in my case is DatabaseA have no more write permission) the application will switch to DatabaseB. How can I manually re-initialize the connection pool so that I can ensure all connection is goi...
brian661
1

votes
0

answer
56

Views

using c3p0 connection pool with hibernate 3

Technologies: JSF, Hibernate 3, eclipse. Glassfish server My website works 100% locally but when I deployed it, it just closes the connection after a while. I thought of using a connection pool to avoid this issue I downloaded the jar file c3p0-0.9.2.1.jar and added it in java class path an added t...
Nxia Nxia
1

votes
0

answer
56

Views

Is there a way for establishing a connection pool in Redis c++?

I am new to Redis, have been working with the Redis driver https://github.com/Cylix/cpp_redis/wiki/Examples. I have made an application in C++, the problem I am encountering is that I keep opening the connection for every query and this process is expensive. I wanted to know if I could make a pool...
Mohammed Tariq
1

votes
1

answer
111

Views

Retrofit first request takes exact OkHttpClient timeout

I'm using Retrofit and OkHttpClient to build a Rest API on Android. Some time ago, i had noticed the very first request made by the api always take way longer to process than all others... At begining i didn't care because it was an acceptable time. But suddenly the request time jumped to 60 SECONDS...
Rafael Lima
1

votes
1

answer
47

Views

Connection pooling issue in nodeJS and MySql

I am using NodeJs and Mysql. I have a query to update one field in mysql table as: Update messaging SET count = count + 1 WHERE msgId = 10; I am using connnection pool. configuration as: var pool = mysql.createPool({ connectionLimit : 100, host: config.mysql.host, user: config.mysql.user, password:...
Amit
1

votes
0

answer
131

Views

IIS application pool recycle - getting timeout when attempting first connection to sql server

We have a very strange issue on our .Net web application. This application runs on multiple environments without any issue. On a new environment we have installed, when a scheduled recycle is executed for the application, on some occasions we get an error that all pooled connections were in use. The...
amazingwolf
1

votes
1

answer
55

Views

Re-establishing connections in Oracle UCP pool

I am using Oracle UCP JDBC, and the following method is for getting a connection from a connection pool. private static PoolDataSource poolDataSource; .... static synchronized Connection createConnection() throws SQLException { if (poolDataSource == null) { poolDataSource = PoolDataSourceFactory.get...
user3573403
1

votes
2

answer
37

Views

Could Issues Occur Using a Singleton SQLConnection in a Single User .NET Desktop Application?

I have inherited a .NET desktop application and am trying to track down an intermittant bug where database locks are not being released. The application takes a Singleton approach to establishing a SQLConnection and I'm wondering if creating and holding open a single instance of a SQLConnection in m...
CptCoathanger
1

votes
1

answer
36

Views

Is preparedstatement cache at connection pool level better than setting cache at jdbc driver level in a multi threaded env?

Was exploring the HikariCP connection pooling library, currently in an application we use Apache DBCP2 for providing a connection pool,which allows setting the preparedstatement cache at connection pooling level by specifiying these properties: But HikariCP clearly mentions in the wiki, that such fe...
yolob 21
1

votes
0

answer
67

Views

SQL Connection seems open

I have the return ExecuteScalar inside using blocks. And when I run the method for the first time it takes some time(I am using localhost). When I run same method for the second time it is very quick, like the connection was open. WHy is it so quick the second time? (...) using (var sqlConnection =...
positive perspective
1

votes
0

answer
31

Views

how to create single common class for jdbc connection pool

I am using jdbc connection pooling and i am getting the connection more than 100 place in the web application. how can i write the common code in single class and call, where required. Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup('java:/comp/env'); Dat...
rajan kumar
1

votes
0

answer
34

Views

How to manage HikariCP connections when they leak?

We have a Java web application that gets a connection from Hikari connection pool (ver. 3.2.0) in an HttpServlet as soon as it receives a request and closes it when the response is returned. We set the leakDetectionThreshold and the connectionTimeout so we can identify the connections that leaks. In...
Giacomo Montibeller
1

votes
1

answer
41

Views

Local and Remote connection pools, Java DBCP

I have the following use-case: I have a system that needs to use two different connection pools, One is for 'local' database (Meaning a database running on the local machine) and the other one is a 'remote' database. (Meaning a database that is running on a remote different server) The remote databa...
StationaryTraveller
1

votes
0

answer
31

Views

How to set properties of Tomcat JDBC Pool when using Spring Cloud Connector config?

I want to configure the properties of the Tomcat JDBC Pool with custom parameter values. The pool is bootstrapped by the spring-cloud (Spring Cloud Connector) environment (Cloud Foundry) and connected to a PostgreSQL database. In particular, I want to set the minIdle, maxIdle and initialSize propert...
EagleRainbow

View additional questions