Hi!
I thought we should not really use c3p0.testConnectionOnCheckout unless really needed as it is quite expensive, but use the idleConnectionTestPeriod with preferredTestQuery and even testConnectionOnCheckin...
We have just moved to hibernate 3, and we are seeing the number of total and busy connections growing really fast in a couple of minutes going to the max number of connections and then busy connections just drop but total number of connections keeping to the maximum even with most connections being idle.
Any explanation?
These are our settings:
acquireIncrement -> 5,
acquireRetryAttempts -> 30,
acquireRetryDelay -> 1000,
autoCommitOnClose -> false,
automaticTestTable -> null,
breakAfterAcquireFailure -> false,
checkoutTimeout -> 0,
connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester,
description -> null,
driverClass -> org.gjt.mm.mysql.Driver,
factoryClassLocation -> null,
forceIgnoreUnresolvedTransactions -> false,
identityToken -> 7f957f95,
idleConnectionTestPeriod -> 600,
initialPoolSize -> 3,
jdbcUrl -> jdbc:mysql://10.147.163.102/cfsite,
loginTimeout -> 0,
maxIdleTime -> 3000,
maxPoolSize -> 600,
maxStatements -> 0,
maxStatementsPerConnection -> 0,
minPoolSize -> 30,
numHelperThreads -> 3,
preferredTestQuery -> SELECT 1,
properties -> {user=******, password=******},
propertyCycle -> 300,
testConnectionOnCheckin -> true,
testConnectionOnCheckout -> false,
usesTraditionalReflectiveProxies -> false
Thanks a lot,
Monica
Quote:
In hibernate 3 you'd do without hibernate.c3p0.validate, and define a c3p0.properties file like this:
# a good mysql test query
c3p0.preferredTestQuery=SELECT 1
c3p0.testConnectionOnCheckout=true