Whenever i am hiting to server on the start of the day, i am getting this exception. Is there may be some other issue related to configuration. Will autoReconnect=true will solve this issue ? Here is my c3p0 configuration for mysql server.
<property name="connection.provider_class=">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="c3p0.testConnectionOnCheckout">true</property> <property name="c3p0.maxIdleTime">0</property> <property name="hibernate.c3p0.acquire_increment">3</property> <property name="hibernate.c3p0.idle_test_period">3000</property> <property name="hibernate.c3p0.timeout">100</property> <property name="hibernate.c3p0.max_size">20</property> <property name="hibernate.c3p0.min_size">4</property> <property name="hibernate.c3p0.max_statements">0</property> <property name="hibernate.c3p0.preferredTestQuery">select 1;</property>
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 49,480,754 milliseconds ago. The last packet sent successfully to the server was 49,480,754 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
|