> Are you using any form of connection testing?

Yes.  Here's a generified config for our postgres pool settings; we
did similar on Oracle and SQL Server.

#==========================================
# Database connection pooling configuration
#==========================================

# == Basic database connection pool configuration ==
database.dialect=org.hibernate.dialect.PostgreSQLDialect
database.driverClass=org.postgresql.Driver
#database.url=jdbc:postgresql://dbhostname.vt.edu/cas
database.url=jdbc:postgresql://1.2.3.4/cas?ssl=true
database.user=username
database.password=password
database.pool.minSize=1
database.pool.maxSize=14

# Maximum amount of time to wait in ms for a connection to become
# available when the pool is exhausted
database.pool.maxWait=10000

# Amount of time in seconds after which idle connections
# in excess of minimum size are pruned.
database.pool.maxIdleTime=120

# Number of connections to obtain on pool exhaustion condition.
# The maximum pool size is always respected when acquiring
# new connections.
database.pool.acquireIncrement=3

# == Connection testing settings ==

# Period in s at which a health query will be issued on idle
# connections to determine connection liveliness.
database.pool.idleConnectionTestPeriod=120

# Query executed periodically to test health of connections in pool
database.pool.connectionHealthQuery=select 1

# == Database recovery settings ==

# Number of times to retry acquiring a _new_ connection
# when an error is encountered during acquisition.
database.pool.acquireRetryAttempts=3

# Amount of time in ms to wait between successive aquire retry attempts.
database.pool.acquireRetryDelay=1000

I should note that the max pool size is ridiculously large for our dev
environment, but we set it high for load testing to avoid pool
shortage conditions interfering with obtaining a good max load
estimate.

M

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to