Hi everybody,
I'm maintaining an application using Torque with an MS SQL Server.
I've not encountered any problems for several months, but since yesterday
(whitout any modification), I got a lot of connection errors like this one :
org.apache.torque.TorqueException: Connection object was null. This could be
due to a misconfiguration of the DataSourceFactory. Check the logs and
Torque.properties to better determine the cause.
at org.apache.torque.util.Transaction.rollback(Transaction.java:185)
at org.apache.torque.oid.IDBroker.storeIDs(IDBroker.java:698)
at org.apache.torque.oid.IDBroker.getNextIds(IDBroker.java:448)
at
org.apache.torque.oid.IDBroker.getIdAsBigDecimal(IDBroker.java:336)
at org.apache.torque.oid.IDBroker.getIdAsInt(IDBroker.java:298)
Or like this one :
java.sql.SQLException: Timed out waiting for pooled connection from 'null'
at
org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:233)
at
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:488)
at
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDataSource.java:458)
at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)
at org.apache.torque.Torque.getConnection(Torque.java:306)
My application is using the
"org.apache.torque.dsfactory.TorqueDataSourceFactory" factory with default
parameters :
torque.dsfactory.oprisk.pool.defaultMaxConnections=10
torque.dsfactory.oprisk.pool.maxExpiryTime=3600
torque.dsfactory.oprisk.pool.connectionWaitTimeout=10
Have you got any idea why pool connection can react like this ?
Do you think that using
"org.apache.torque.dsfactory.SharedPoolDataSourceFactory" and increasing number
of max connections allowed could resolve my problem ?
Besides, i would like to improve database-side performance, has someone already
studied this way ?
Hope this is inspiring some people ...
Thanks a lot if you got any idea.
==================================
Frédéric Kerneuzet
==================================