Hi,

Anyone out there with Torque use  in a high volume load situation?

I'm having trouble with a bottleneck in DBCP with Torque.  I set my DBCP
connection pool limit to 300 (in the Torque config file) and my mysql
"max_connections" to 300, but the "max_used_connections" variable in MySQL
never goes above about 70.

I'm running Torque 3.3, DBCP 1.2.2, and Commons Pool 1.3.

I can see that the DBCP connection pool is blocking.  With 150 users I have
dozens of threads blocked as follows:

"ajp-8009-178" - Thread t...@334
   java.lang.Thread.State: BLOCKED on org.apache.commons.dbcp.datasources.
sharedpooldatasou...@7d25fd97 owned by: ajp-8009-168
    at org.apache.commons.dbcp.datasources.SharedPoolDataSource.
getPooledConnectionAndInfo(SharedPoolDataSource.java:157)
    at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.
getConnection(InstanceKeyDataSource.java:669)
    at org.apache.commons.dbcp.datasources.InstanceKeyDataSource.
getConnection(InstanceKeyDataSource.java:653)
    at org.apache.torque.TorqueInstance.getConnection(
TorqueInstance.java:912)
    at org.apache.torque.Torque.getConnection(Torque.java:314)
    at org.apache.torque.util.Transaction.beginOptional(
Transaction.java:108)
    at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:753)
    at com.forio.broadcast.om.base.BaseRunPeer.doSelectVillageRecords(
BaseRunPeer.java:510)
    at com.forio.broadcast.om.base.BaseRunPeer.doSelectVillageRecords(
BaseRunPeer.java:482)
    at com.forio.broadcast.om.base.BaseRunPeer.doSelect(
BaseRunPeer.java:451)

My Torque config looks like:

torque.dsfactory.bt.connection.user =
torque.dsfactory.bt.connection.password =
torque.dsfactory.bt.connection.url = jdbc:mysql://
tdb.forio.com/bt?dumpQueriesOnException=true&zeroDateTimeBehavior=convertToNull
torque.dsfactory.bt.connection.driver = com.mysql.jdbc.Driver


torque.dsfactory.bt.factory =
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.bt.pool.validationQuery=SELECT 1
torque.dsfactory.bt.pool.maxActive=300
torque.dsfactory.bt.pool.testOnBorrow=true

torque.database.default = bt
torque.database.bt.adapter = mysql


Any suggestions?

WILL

Reply via email to