Use a different connection pool that can properly handle your timeouts when idle.
http://people.apache.org/~fhanik/jdbc-pool/
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

Filip

On 02/24/2011 11:31 PM, abhishek jain wrote:
hi,
I am not sure if i am ringing the correct list, but i am sure people here
must have encountered this problem. I am new to hibernate and when i ran the
code on server it was fine , strangely next day it keep on giving this error
till i restart tomcat.

The last packet successfully received from the server was 54,880,316
milliseconds ago.  The last packet sent successfully to the server was
54,880,317 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.

I have searched a lot on net and added the following properties on
hibernate.cfg.xml, as people there were suggesting this,but of no use.
<!-- Sessions and transactions -->
<!-- Use the C3P0 connection pool provider -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="current_session_context_class">thread</property>



Pl. help me.
I have used hibernate3 with myeclipse as the development environment, and am
using mysql 5.x and centos (Linux) with Tomcat 5.x


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to