connection-pooling

Can I use multiple C3P0 datasources for DB instance?

那年仲夏 提交于 2020-02-01 05:41:10
问题 I was wondering if I can run multiple c3p0 datasources for one DB, something like: <bean id="dataSource1" class = "com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="${db.driverClassName}"/> <property name="jdbcUrl" value="${db.url}/schema1"/> <property name="user" value="${db.username}"/> <property name="password" value="${db.password}"/> <property name="acquireIncrement" value="1" /> <property name="idleConnectionTestPeriod" value="100"/>

Why does the server log that it can not open keystore.jks when I try to create a connection pool?

这一生的挚爱 提交于 2020-01-25 10:17:29
问题 Why am I not able to create a JDBC Connection Pool in GlassFish 5.0? I want connect to MySQL server. I created connection pool by guide, but nothing is working. I used Resource type: java.sql.DataSource Driver class name: com.mysql.cj.jdbc.MysqlDataSource [2018-07-17T15:45:15.500+0300] [glassfish 5.0] [WARNING] [test.connection.pool.failed [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=45 _ThreadName=admin-listener(4)] [timeMillis:

java.lang.IllegalStateException: Connection pool shut down exception

假如想象 提交于 2020-01-25 08:01:05
问题 I have changed my code version from http to https and I am using HttpClient client = HttpClientFactory.getHttpsClient() for execution purposes. When I am trying to run my code for the first time it is running fine and next time is throwing the exception java.lang.IllegalStateException: Connection pool shut down exception I am using 4.5HC. 回答1: Do not close your client after a request if you are pooling the connections. That is, you are probably doing something like this:

Connection pooling in AWS across lambdas

一个人想着一个人 提交于 2020-01-24 03:44:13
问题 We know lambdas are charged by the execution time. So now I want to connect to SQL Server DB from lambda. If I create a connection in each lambda, it would be heavy for lambda. Is there any best way to maintain my SQL connections alive in one place and will be able to use across my all lambdas. Or at least alive for one lambda for multiple executions. I know, lambdas should be treated like stateless, but still, I am looking for a better solution for this issue. I have searched over many sites

HikariPool-1 - Connection is not available, request timed out after

隐身守侯 提交于 2020-01-23 06:59:32
问题 I'm using HikariCP 2.4.7 for connection pool. Everything is fine just after starting the application but after some time without invoking getConnection() I get this error when I'm trying to getConnection() : java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 42734ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:555) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:188) at com.zaxxer

TransactionScope and Connection Pooling

折月煮酒 提交于 2020-01-22 18:40:51
问题 I'm trying to get a handle on whether we have a problem in our application with database connections using incorrect IsolationLevels. Our application is a .Net 3.5 database app using SQL Server 2005. I've discovered that the IsolationLevel of connections are not reset when they are returned to the connection pool (see here) and was also really surprised to read in this blog post that each new TransactionScope created gets its own connection pool assigned to it. Our database updates (via our

TransactionScope and Connection Pooling

僤鯓⒐⒋嵵緔 提交于 2020-01-22 18:40:46
问题 I'm trying to get a handle on whether we have a problem in our application with database connections using incorrect IsolationLevels. Our application is a .Net 3.5 database app using SQL Server 2005. I've discovered that the IsolationLevel of connections are not reset when they are returned to the connection pool (see here) and was also really surprised to read in this blog post that each new TransactionScope created gets its own connection pool assigned to it. Our database updates (via our

Creating and managing multiple connections in Redis Python

﹥>﹥吖頭↗ 提交于 2020-01-22 09:56:26
问题 I am using Redis to store two databases : 0 and 1 via the Redis-py client library. I would like to create two connections for each database. Currently, I am doing this : >>> connection0 = redis.Connection(host = 'localhost', port = 6379, db = 0) >>> connection1 = redis.Connection(host = 'localhost', port = 6379, db = 1) >>> connection0.connect() However, I don't seem to find a way to create a Redis object from the connection. >>> store0 = redis.Redis(connection0) >>> store0.info() Traceback

Connection Pool Strategy: Good, Bad or Ugly?

偶尔善良 提交于 2020-01-22 04:59:13
问题 I'm in charge of developing and maintaining a group of Web Applications that are centered around similar data. The architecture I decided on at the time was that each application would have their own database and web-root application. Each application maintains a connection pool to its own database and a central database for shared data (logins, etc.) A co-worker has been positing that this strategy will not scale because having so many different connection pools will not be scalable and that

Sysprocesses table - will it help me debug connection pooling issues?

风格不统一 提交于 2020-01-16 09:48:13
问题 I've got a windows service that regulary (every 10 sec) does a lot of db activity. I've verified that all my connections are closed (using using). After some time (days or hours) I get this error: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occured because all pooled connections were in use and max pool size was reached. I found that I should check the sysprocesses table, and found that it is creating lots of new entries when my