commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Britton <jbritto...@gmail.com>
Subject [dbcp][pool] SQLException Connection reset even with validation query
Date Sun, 07 Nov 2010 15:07:13 GMT
Hi -
Using older version of dbcp (1.2.2) and pool (1.3) we've been getting
java.sql.SQLException: Io exception: Connection reset after retrieving a
connection from pool that has been timed out or gone away for some reason
even though we've configured dbcp with testOnBorrow and validationQuery.  I
have even tried adding in the idle evictor thread settings as well with no
help from that either.  I've just updated our libs to use latest dbcp and
pool but I'm very pessimistic that updating the libs would fix such a very
fundamental problem or am I completely missing what testOnBorrow and
validationQuery should be accomplishing?  I'd really love to hear that this
bug/lack of robustness has been addressed in latest version of dbcp or that
my configuration parameters below are at fault.  Thanks for any suggestions
or information,

            DriverAdapterCPDS da = new DriverAdapterCPDS();
            da.setDriver("oracle.jdbc.OracleDriver");
            da.setPoolPreparedStatements(false);
            da.setUrl(DB_CONNECT_STR);
            SharedPoolDataSource tds = new SharedPoolDataSource();
            tds.setConnectionPoolDataSource(da);
            tds.setValidationQuery("select 'validationQuery' from dual");
            tds.setTestOnBorrow(true);

            tds.setMaxActive(450);
            tds.setMaxWait(1000);
            tds.setMaxIdle(20);

            tds.setTestWhileIdle(true);
            tds.setTimeBetweenEvictionRunsMillis(100000);
            tds.setNumTestsPerEvictionRun(100);
            tds.setMinEvictableIdleTimeMillis(450000);

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