Hi,
My problem:
When the webapp is deployed dbcp creates the connection pool and everything works as expected. After about 12-24 hrs of leaving it running on a test server, i try to access the application again and get an error message that looks like the pool cannot get a connection. Below is the full stack trace:
java.sql.SQLException: Communication link failure: java.io.EOFException,
underlying cause: null
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1394)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1538)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1929)
I got this problem some time ago with hibernate 2 and solved it with dbcp.
Eberythi,g was working fine since 6 months.
Now I just migrated to hibernate 3 and I am getting that problem again.
Should I change my config ? Is there some bug in hibernate 3 ?
I use :
hibernate3.jar
commons-dbcp-1.1.jar
MySql
My dbcp config is the following :
<!--connection pool-->
<property name="hibernate.dbcp.maxActive">10</property>
<property name="hibernate.dbcp.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.maxWait">20000</property>
<property name="hibernate.dbcp.maxIdle">10</property>
<!-- prepared statement cache-->
<property name="hibernate.dbcp.ps.maxActive">10</property>
<property name="hibernate.dbcp.ps.whenExhaustedAction">1</property>
<property name="hibernate.dbcp.ps.maxWait">20000</property>
<property name="hibernate.dbcp.ps.maxIdle">10</property>
<!-- optional query to validate pooled connections:-->
<property name="hibernate.dbcp.validationQuery">select 1</property>
<property name="hibernate.dbcp.testOnBorrow">true</property>
<property name="hibernate.dbcp.testOnReturn">true</property>
thanks
|