connection-pooling

Do I need to use C3P0 pooling library in my (grails) web application?

前提是你 提交于 2019-12-22 18:23:16
问题 I am not familiar at all with connection pooling library. I've just discovered it through this blog article) and I am not sure that I should use one in my web application based on grails/hibernate/mysql. So my question is simple : in which situations would you suggest to integrate a connection pooling library into a grails application? Always, Never or only over some connections threshold? P.S. : If you have ever used successfully C3P0 in your web application, I will greatly appreciate to

Use Connection pool with Jedis

随声附和 提交于 2019-12-22 08:59:21
问题 I am using Jedis to connect with a Redis server in a REST service. When I am calling the web service I want to do operations like jedis.hmget , jedis.exits and hgetALL . For example: jedis.hmget("employee:data:" + emp_user_id, "employee_id").get(0); The configuration that I am using for Redis is: Jedis jedis; JedisShardInfo shardInfo; @PostConstruct public void init() { try { shardInfo = new JedisShardInfo(Config.getRedisHost(), Config.getRedisPort()); shardInfo.setPassword(Config

Connection Pooling with NEST ElasticSearch Library

偶尔善良 提交于 2019-12-22 08:51:15
问题 I'm currently using the NEST ElasticSearch C# Library for interacting with ElasticSearch. My project is an MVC 4 WebAPI project that basically builds a RESTful webservice for accessing directory assistance information. We've only just started working with NEST, and have been stumbling over the lack of documentation. What's there is useful, but it's got some very large holes. Currently, everything we need works, however, we're running into an issue with connections sometimes taking up to a

Connection Pooling with NEST ElasticSearch Library

﹥>﹥吖頭↗ 提交于 2019-12-22 08:50:07
问题 I'm currently using the NEST ElasticSearch C# Library for interacting with ElasticSearch. My project is an MVC 4 WebAPI project that basically builds a RESTful webservice for accessing directory assistance information. We've only just started working with NEST, and have been stumbling over the lack of documentation. What's there is useful, but it's got some very large holes. Currently, everything we need works, however, we're running into an issue with connections sometimes taking up to a

How to resolve “Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL”

旧街凉风 提交于 2019-12-22 08:49:43
问题 Firstly I want to say that i checked all answers at stackoverflow, and i can't fix this bug! Help me please! I spend a lot of time, but no result. I'm trying to create connection pool using Tomcat8. I have an exception: java.sql.SQLException: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql:/localhost:3306/autopark' at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:2160) at org.apache.tomcat.dbcp.dbcp2

C3P0: unreturnedConnectionTimeout in production?

匆匆过客 提交于 2019-12-22 06:56:37
问题 The parameter unreturnedConnectionTimeout times out unreturned connections after a given period of time. I'm trying to decide whether I should use this in my production persistence.xml ? A big plus of using this is that the Connection Pool will be able to recover from leaky connections. A big minus is that leaky connections will be very difficult to detect. Should I use unreturnedConnectionTimeout in production applications? If yes, what should its value be? Are there any other pros/cons I

Is connection pooling in akka-http using the source queue Implementation thread safe?

一个人想着一个人 提交于 2019-12-22 05:13:08
问题 Refering to the following implementation mentioned in: http://doc.akka.io/docs/akka-http/10.0.5/scala/http/client-side/host-level.html val poolClientFlow = Http().cachedHostConnectionPool[Promise[HttpResponse]]("akka.io") val queue = Source.queue[(HttpRequest, Promise[HttpResponse])](QueueSize, OverflowStrategy.dropNew) .via(poolClientFlow) .toMat(Sink.foreach({ case ((Success(resp), p)) => p.success(resp) case ((Failure(e), p)) => p.failure(e) }))(Keep.left) .run() Is it thread safe to offer

Should I close a connection that came from a datasource?

拥有回忆 提交于 2019-12-22 04:29:13
问题 When I do a dataSource.getConnection(), when I want the connection to be return to the pool (and not closed), does calling the close method return the connection to the pool or actually close it? 回答1: When you call the close() on connection returned by a DataSource, it would return that to the pool to be used by other thread. Closing the connection defeats the purpose of the pool. 来源: https://stackoverflow.com/questions/4670617/should-i-close-a-connection-that-came-from-a-datasource

Basicdatasource connection time out problem (using mysql)

假如想象 提交于 2019-12-22 01:19:33
问题 I am using BasicDatasource in my application. This application is processing huge amount of raw data. Sometimes 1 query can take more than 15 minutes. (using mysql as db) Here is my question, I acquire a connection from pool, then execute several queries on it. But when I use the same connection more than 15 minutes, I get the error below. In the mysql server max_wait is set to 180 hours so it shouldn t be a problem to keep the connection alive and no firewall rule set to kill connections

.NET CORE MySql MaxPoolSize not applied in

耗尽温柔 提交于 2019-12-22 00:45:06
问题 We have a MySQl database hosted in RDS. When creating a MySQL Connection the maximum Pool size doesn't seem to be applied. We have a connection string that looks like this Server=myServer;Port=3306;Database=MyDatabase;User Id=MyUser;Password=MyPassword;ConnectionReset=True;pooling=true;minpoolsize=1;maxpoolsize=4;ConnectionLifeTime=30" We are adding the max pool size over here, but our application still keeps taking too many connections. I've verified this in MySqlWorkbench with the command