commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashanth Adhikari" <>
Subject [DBCP] How do I instrument connection pooling
Date Fri, 13 Jun 2003 01:41:07 GMT
We are using Torque with Tomcat in one of our projects. We are having some 
performance issues and I was wondering if anyone has had any experience 
tuning the connection pooling parameters. I recently took a Thread dump of 
our application while running a 100 user load test. I found several threads 
waiting to lock on Jdbc2PoolDataSource.getConnection(). I had set 
defaultMaxActive = 50. I changed it to defaultMaxActive = -1 and saw a 
performance improvement. Is this an appropriate setting to use? I am not 
sure if the connection pool is getting exhausted. How can I tell at any time 
what the number of active connections and idle connections are in the pool? 
I tried to tried to modify Torque.getConnection()  to log 
Jdbc2PoolDataSource.getNumActive() and Jdbc2PoolDataSource.getNumIdle(). But 
that did not seem to work, Torque.getConnection() would not even return. Any 
tips on tuning connection pooling parameters or debugging dbcp would be 


Add photos to your e-mail with MSN 8. Get 2 months FREE*.

View raw message