My Java App communicates to MySQL using Hibernate and C3p0 libraries. I am getting following exception almost every day.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException MESSAGE: Communications link failure
The last packet successfully received from the server was 32,088,839 milliseconds ago. The last packet sent successfully to the server was 11 milliseconds ago
Below is the details from Hibernate.cfg.xml
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">10080</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="connection.autoReconnect">true</property>
<property name="connection.autoReconnectForPools">true</property>
<property name="connection.is-connection-validation-required">true</property>
My site gets frequent hits and every one hour i am executing select statements. I am not able to understand the reason behind this.
Thanks.