Does anyone know of a way to avoid having your JDBC connection timeout? When my server goes idle, the connection drops and then subsequent hibernate requests fail with an underlying java.io.EOFException
I tried adding ?autoReconnect=true to my connection.url but that hasn't worked.
<property name="connection.url">jdbc:mysql://localhost/mysqlDB?autoReconnect=true</property>
Any other ideas? Many thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does anyone know of a way to avoid having your JDBC connection timeout? When my server goes idle, the connection drops and then subsequent hibernate requests fail with an underlying java.io.EOFException
I tried adding ?autoReconnect=true to my connection.url but that hasn't worked.
<property name="connection.url">jdbc:mysql://localhost/mysqlDB?autoReconnect=true</property>
Any other ideas? Many thanks.
This also happens if the database server gets restarted. Somehow hibernate needs to re-establish it's connections.
I'm using the built in hibernate connection pool….perhaps that is too simplistic.