connection-pooling

Something wrong with Hibernate DB connection pooler c3p0

三世轮回 提交于 2019-11-30 20:06:36
问题 since last post, did all the changes suggested but this problem still haunts me. Here's the error i get: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 44,499,102 milliseconds ago. here's my hibernate.cfg.xml <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate

Tomcat connection pooling, install jdbc driver for web-app

倖福魔咒の 提交于 2019-11-30 16:11:31
I am making a web-app with Tomcat 6 as the container and I'm trying to use connection pooling. The jdbc driver I am using is jtds-1.2.2 . The pool works fine when the driver jar is placed under ${Catalina_Home}/lib , but my hosting provider would not let me do so. I get a CNF-Exception when the driver is placed in the WEB-INF/lib . Could someone please provide a solution where I won't have to access the tomcat installation? If you don't have control over the server, then you're lost. Just create the connection pool yourself instead of letting the container do it. I suggest to use c3p0 for this

Tomcat connection pooling, install jdbc driver for web-app

北城以北 提交于 2019-11-30 16:03:07
问题 I am making a web-app with Tomcat 6 as the container and I'm trying to use connection pooling. The jdbc driver I am using is jtds-1.2.2 . The pool works fine when the driver jar is placed under ${Catalina_Home}/lib , but my hosting provider would not let me do so. I get a CNF-Exception when the driver is placed in the WEB-INF/lib . Could someone please provide a solution where I won't have to access the tomcat installation? 回答1: If you don't have control over the server, then you're lost.

Tomcat JDBC Conencton Pool + MySQL gives “Broken pipe” problems, even with connection validation

时间秒杀一切 提交于 2019-11-30 15:51:44
问题 I'm fighting with configuring Tomcat JDBC Connection Pool to achieve reliability. Current issue is that in test environment I have such scanerio in webapp: day 1: everything works fine day 2: webapp cannot comunicate with MySQL for several hours, lot of "Broken pipe" in logs day 3: suprisingly, everything works fine again (without ingerention or restart) I have configured validationInterval , validationQuery , validationTimeout . This is my data source config: <bean id="dataSource" class="org

Tomcat JDBC Conencton Pool + MySQL gives “Broken pipe” problems, even with connection validation

时间秒杀一切 提交于 2019-11-30 15:30:26
I'm fighting with configuring Tomcat JDBC Connection Pool to achieve reliability. Current issue is that in test environment I have such scanerio in webapp: day 1: everything works fine day 2: webapp cannot comunicate with MySQL for several hours, lot of "Broken pipe" in logs day 3: suprisingly, everything works fine again (without ingerention or restart) I have configured validationInterval , validationQuery , validationTimeout . This is my data source config: <bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close"> <property name="driverClassName" value=

BoneCP correct usage

淺唱寂寞╮ 提交于 2019-11-30 14:55:57
问题 I've just started using BoneCP and pulled the sample JDBC code from the authors site. I have a function called getConnection() that returns a connection here is a snippet: // setup the connection pool BoneCPConfig config = new BoneCPConfig(); // Config goes here. connectionPool = new BoneCP(config); // setup the connection pool return connectionPool.getConnection(); // fetch a connection Now, my questions: 1) Do I call connection.close() when I am finished using the connection that is

Is “Tomcat 7 JDBC Connection Pool” good enough for production? And how is it compare to BoneCP?

不打扰是莪最后的温柔 提交于 2019-11-30 12:28:02
问题 Our site get roughly 1M pv/day, and we use Tomcat for sure. I couldn't find much information about jdbc-pool, not sure if it's stable enough for production. Anyone got experience on it? and any configuration/tuning stuff for reference? As someone mentioned, BoneCP might be another choice. But seems it's discontinued (so sad...). Would it be a better choice? btw, HikariCP is too young, I would keep an eye on it as it's the latest/fastest CP so far I found. Thanks for any advice. 回答1: I'm one

Heroku + Sidekiq: ActiveRecord::StatementInvalid: PG::UnableToSend: SSL SYSCALL error: EOF detected

余生颓废 提交于 2019-11-30 11:12:31
Hi we are running on Heroku's Cedar stack with Unicorn and Sidekiq. We intermittently get the following errors BurnThis ActiveRecord::StatementInvalid: PG::UnableToSend: SSL SYSCALL error: EOF detected ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() SSL SYSCALL error: Connection timed out Does anyone have any insight what the direct cause of these errors? Is it too many connections to our database? We have our forking set up already in the following way: unicorn.rb worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3) timeout 30 preload_app true before_fork do |server,

Using BoneCP: Handling connections from the pool

╄→гoц情女王★ 提交于 2019-11-30 09:51:11
I have just started using BoneCP and this is my first time using a connection pool. I'm somewhat confused as to how I am supposed to use it. Currently I am saving the BoneCP-object as a static variable, and thus I can use it between different connections. When I'm done with the connection, I close it with connection.close() . Should I do this, or should I not close it to enable it to be reused by the pool? This is my current implementation to get a connection: private static BoneCP connectionPool; public Connection getConnection() throws SQLException { if (connectionPool == null) { initPool();

How to set custom connection properties on DataSource in Spring Boot 1.3.x with default Tomcat connection pool

依然范特西╮ 提交于 2019-11-30 09:31:40
I need to set some specific Oracle JDBC connection properties in order to speed up batch INSERT s ( defaultBatchValue ) and mass SELECT s ( defaultRowPrefetch ). I got suggestions how to achieve this with DBCP (Thanks to M. Deinum) but I would like to: keep the default Tomcat jdbc connection pool keep application.yml for configuration I was thinking about a feature request to support spring.datasource.custom_connection_properties or similar in the future and because of this tried to pretent this was already possible. I did this by passing the relevant information while creating the DataSource