connection-pooling

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

核能气质少年 提交于 2019-11-30 02:10:07
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. I'm one of the authors of HikariCP. That said, the "new" Tomcat pool is among the best we've tested. It has a lot of

Ideal settings for pgbouncer with Django's CONN_MAX_AGE

心已入冬 提交于 2019-11-30 01:42:25
I'm running a multi-tennant website, where I would like to reduce the overhead of creating a PostgreSQL connection per request. Django's CONN_MAX_AGE allows this, at the expense of creating a lot of open idle connections to PostgreSQL (8 workers * 20 threads = 160 connections). With 10MB per connection, this consumes a lot of memory. The main purpose is reducing connection-time overhead. Hence my questions: Which setup should I use for such solution? (PgBouncer?) Can I use 'transaction' pool mode with Django? Would I be better off using something like: https://github.com/kennethreitz/django

Java Database connection pool (BoneCP vs DBPool vs c3p0)

不打扰是莪最后的温柔 提交于 2019-11-29 23:04:14
For a Java app outside of a J2EE container, which connection pool library is the best? I heard c3p0 is getting outdated. Jakarta's common pool library is no longer under development Therefore I'm left with BoneCP and DBPool . From what I can tell both have limited activity. The main difference I can see is performance, which BoneCP seems to win out with. However the documentation is pretty weak. Which database pool library have you used in the real world and why? What was the good and bad? At work we have used BoneCP (as the replacement for c3p0) and as far as I know haven't had any issues (I

JDBC Connection pooling using C3P0

浪尽此生 提交于 2019-11-29 22:17:05
Following is my helper class to get DB connection: I've used the C3P0 connection pooling as described here . public class DBConnection { private static DataSource dataSource; private static final String DRIVER_NAME; private static final String URL; private static final String UNAME; private static final String PWD; static { final ResourceBundle config = ResourceBundle .getBundle("props.database"); DRIVER_NAME = config.getString("driverName"); URL = config.getString("url"); UNAME = config.getString("uname"); PWD = config.getString("pwd"); dataSource = setupDataSource(); } public static

how long must a sql server connection be idle before it is closed by the connection pool?

半腔热情 提交于 2019-11-29 17:46:47
问题 I have a client-server app that uses .NET SqlClient Data Provider to connect to sql server - pretty standard stuff. By default how long must connections be idle before the connection pooling manager will close the database connection and remove it from the pool? What setting if any controls this? This MSDN document only says The connection pooler removes a connection from the pool after it has been idle for a long time, or if the pooler detects that the connection with the server has been

How do I configure HikariCP for postgresql?

不羁岁月 提交于 2019-11-29 16:49:55
I'm trying to use HikariCP in postgresql and I can't find anywhere the configuration for postgresql. Please point me to any example for postgresql with HikariCP or any configurations tutorial for the same. I tried to use it like below but it didn't work and then I realized it was meant for MySQL public static DataSource getDataSource() { if(datasource == null) { HikariConfig config = new HikariConfig(); config.setJdbcUrl("jdbc:mysql://localhost/test"); config.setUsername("root"); config.setPassword("password"); config.setMaximumPoolSize(10); config.setAutoCommit(false); config

How to properly keep a DB connection from a Connection Pool opened in JBoss

烂漫一生 提交于 2019-11-29 16:29:13
I'm using JBoss AS 7.1 as a server and I have my DataSource configured with pooling. I'm quite new to this so please excuse any rookie mistakes... after all I'm here to learn. When a client logs-in it gets a connection to the database and I need to keep that connection(from the pool) open until the user logs-out or the HttpSession expires. This is an absolute requirement coming from our DB Admin. who says that he needs the DB session variables. I am using a servlet for all this. Playing with the possibilities I have encountered 2 major problems: As far as I see JBoss automatically closes

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

折月煮酒 提交于 2019-11-29 13:37:45
问题 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

django 1.7 and connection pooling to PostgreSQL?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 12:16:59
问题 What are the differences between the django apps (Django-PostgresPool, djorm-ext-pool, django-db-pool) and PG Bouncer or PG Pool? Do the apps use one of the last two packages? In this article, the author says that there is a patch starting with django 1.6. Does that mean we do not have to use any of these solutions anymore, neither the apps, nor the PG Bouncer or PG Pool package? 回答1: Postgres database connections are expensive (resources) compared to MySQL connections. Django pooling apps

ODP.NET connection pooling: How to tell if a connection has been used

无人久伴 提交于 2019-11-29 12:02:18
I'm modifying a Winforms app to use connection pooling so data access can occur in background threads. The business logic is implemented in PL/SQL and there are a couple of security related stored procedures that have to be called in order to make use of the business logic. What I need is a way to tell if the connection has been used without a round-trip to the database. I don't think I can keep track of them in a HashSet because I doubt Equals or even ReferenceEquals could be relied upon. Any ideas? EDIT: Just to be clear, I plan to use ODP.NET's built-in connection pooling mechanism. If I