commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daniel steel <sec...@yahoo.com>
Subject Connection Pool Tuning
Date Tue, 30 Jun 2009 20:01:51 GMT
hi all,
  we are running a load test using tomcat6 with SQL Server and dbcp connection pooling.
This is our current conn pool set up - Some of the parameters are not ideal for prod env..

initialSize="5"
maxActive="-2"
maxIdle="85"
maxWait="10000"
timeBetweenEvictionRunsMillis="1800000"
removeAbandoned="true"
removeAbandonedTimeout="4"

During the run, for some of the long running jsp  we started getting errors and logs had these
kind of errors..

1.
java.sql.SQLException: Connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@a6ebc0c is closed.
    at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.checkOpen(DelegatingConnection.java:354)
    at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:222)
    at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.createStatement(PoolingDataSource.java:205)

2. 
java.sql.SQLException: Invalid state, the Connection object is closed.
    at net.sourceforge.jtds.jdbc.TdsCore.checkOpen(TdsCore.java:448)
    at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:946)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:406)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1258)
    at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)

Is these errors because of removeAbandonedTimeoutsetting? 
would increasing the timeout help in reducing the errors? 
or 
what would cause these errors? 
would turning on logAbandoned help to correlate these errors to connection closed by dbcp?

thank you
bharat



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message